Expanding the number of objects available for use in Storyboard - ios

I want to create an MKAnnotationView in my storyboard, but when I click on the button, there is no option to add this.
Is there a way to import custom libraries or expand the list of objects available to use in the storyboard?
Everything I have searched on the topic returned results about adding stuff from the storyboard into viewController.swift or adding already available objects into the storyboard, so I obviously don't know the right words to search for if there are answers online.

It is not possible to create everything on storyboard, you just add the mapView from storyboard to your view controller. But then in order to customize your mapView with annotations, or showing user location etc, you need to write some code.
I found the following tutorial very useful when I first started to learn about MapKit and location services in iOS. I'd suggest to go along with that and then you will have a basic understanding of how MapKit and it's features work.
https://www.raywenderlich.com/548-mapkit-tutorial-getting-started

Related

How to launch a custom UIView as a Dialog iOS

I'm working on a Dialog for my iOS app, and have decided that the default boxes don't allow for the level of customization I am looking for.
So, I have created a view inside a storyboard. It is embedded in a view called DialogBoxView inside DialogLayout.storyboard with a view controller called DialogLayoutViewController.
In short, I want to be able to open the specific view as a Dialog. (Like this below.)
But, as previously mentioned, I want the View inside the Storyboard to inflate as the dialog's layout.
What I need is a way to call into the ViewController handling the Storyboard [I can do this] and open the specific DialogBoxView inside.
See:
My Hierarchy
See:
My Layout
Please note that I have browsed around a bit on Google, and nothing is useful. It is either outdated (OBJ-C) or not what I really need.
Additionally, is it possible just to (like in Android/Java) "inflate" the View layout as the Dialog's view?
Summary:
Can anyone give me an example on how to inflate a specific view (inside a Storyboard) as the dialog programmatically from the ViewController?
I'm still kinda new to Swift and iOS development in general, and I have come across some functions that may work, I just can't put them together in a way that actually works.
NOTE: I have found a way around custom layouts, but am still curious as to how this might work.
Swift 5
Some time ago, I created one project similar: You can see in: https://github.com/MaatheusGois/custom-alert

Multiple Photos in slideshow type display within viewController?

I am new to Xcode (started a few days ago).
I'm trying to find a way to get a few photos or videos in a display where the user can scroll or tap through as they desire. There will be multiple viewControllers each with a different set of photos.
Is there any existing UI type data types I can just drag and drop to make this work? Or is this out of range of the capabilities for someone not using code specifically.
I know Java, C, C++, MATLAB, etc. but never have toyed with Objective-C until now. Point being, I should be able to follow any logic you can throw at me, but I'm unfamiliar with the GUI and layout of Xcode as a whole.
This is what I currently have.
This is what I want. Perhaps with functionality to tap to full screen the image or swipe to go to another image. (This image was made with photosop. I don't actually have the picture file in Xcode because I don't know how)
SOLVED: Placed desired images in "Supporting files" content folder inside Xcode. This allowed me to select which photo I want displayed in which ImageView. To fix the proportionality issue where photos in Simulator are far too large, I simply added height and width constraints along with some other centering aspects and got the desired result.
Add UICollectionView in your view and set flow of collection view is horizontal make cell size that you want to keep.
Take a look at UICollectionViewController where you can display multiple cells with embedded views for your images, and consider segueing between them via a UINavigationController.
Edit: Now that you've added screenshots, I'd recommend using a UICollectionView embedded on your subclass of a UIViewController instead of a UICollectionViewController. This should give you more flexibility.

Advice about structuring data in Swift using TableView and mapping on GoogleMaps

I would like to get some advice. I am in the process of making an application where ideally a user can scan through a list of places, see some detail about the place (like name, perhaps some pictures) and be able to select the places they want and save it on a map.
For this I wanted to use Google API. I have created a tabbed application and in one tab I have the GoogleMaps and in another TableView which follows through onto a DetailTableView. My question is firstly, is it possible to link between tabs where upon selection of a cell by the user in Tableview would automatically map the place onto the GoogleMaps tab? Secondly, is there any advice about how to approach this? And how this type of database should be stored/structured? It would have to be a database which will allow access to be updated as well as the user to contribute perhaps.
In the initial table view I would probably just want the name of places whereas the Detailed table view should give more details such as Address, website link (if place is a business), opening times, related pictures etc...
I think you're better off checking Place Autocomplete as it deals with names of places and some details about them. It also has sample codes on displaying Table Views.
If you want additional code samples, check out Layering a table view and a google map view iOS Swift and Picker Places from Google Maps to UITableView.

How to get annotations on a map view while clicking a cell in a tableview?

I have a popoverview containing a tableview,showing some locations. Now my problem is, while clicking on the locations in the tableview i need to go to the view controller containing a mapview and get annotations . Unfortunately i don't know how to do it, i am new to Xcode. Please anyone help me.
The table view has to notify the view controller in charge of the map about the selection. The most common way to do this is with a #protocol and a delegate.
If you do not know how to do this, you should first learn how iOS works. I recommend the excellent and free Stanford University course.

table view is covered with an empty table view when integrate TTCatalog to a Tabbar template project

I created a project with Tabbar template. The First View of my Tabbar project just wants the same function of the TTCatalog sample project. The Second View will integrate a Map function.
I integrate some code from TTCatalog sample project to do so. But when my App starts, only an empty tableview displayed in my first view. It's just a white table with some empty rows. nothing else.
When I quit my App from emulator, and start it again from emulator,first I can see a table view like that of TTCatalog ( with blue titles and labels), But soon the table view is covered with an empty table view.
Please help
thanks
There is no need to inherit CatalogController, if the only thing you need is a tableView inside a tabBarController then there is even no need to use three20 at all. To get started I would recommend you use a simpler approach. While three20 and the TTTableViewController can help a lot with a certain kind of setups, it is not the general best way to do things.
Let your FirstViewController inherit from UITableViewController, implement the UITableViewDataSource methods. If you are experiencing problem or need with a specific problem feel free to ask here.
If you got this working and you really need something that three20 can help you achieve, read through the TTTableViewController sources, TTModel, TTTableViewDataSource, find a tutorial and go on.
Maybe this question may help you: Three20's URL-based navigation + tab bar example? especially this link: http://three20.pypt.lt/url-based-navigation-and-state-persistence

Resources