I want to make my app open another View Controller on the tap of an already present place on the map. When you open a map there are many places shown on map with their names i think they are called land marks. I want to make it so when a user selects such landmark i show information to him about it. The problem is I want that user directly clicks on such place and don't want to make annotations on map Is this possible?
Related
I created a custom UIView using storyboard. I don't want this at the coordinates that it is in in my storyboard, but I want to be able to reuse it throughout my app at different locations on a map like this. I also want to be able to update the text in there at the users request, and the number in there should increase whenever the green button is clicked. I also want to customize the image below it, like I learned in this question so that the user annotation has an image and this callout above it. The callout would only be there if the user has posted some text. It would look like this.
My previously linked example uses a method called setcenter to place the coordinate in the middle of the annotation, but it looks like the MGLMapView documentation and uiview documentation contain at most a setcentercoordinate function, so this is why I tried creating the annotation in storyboard instead of coding it in swift, because I didn't know how to add things to the annotation. It also doesn't look like that example show's how to constrain views to the bottom corners, like I did with my buttons (There is one view for the rocket and person button, and one view for the arrow button and the number).
Because I want to update the text field and that number(which is a label), I don't know if storyboard is the best idea to create this. I also don't know if I can use a storyboard object at a dynamic location, and create multiple of them throughout the map
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.
I'm working with a 3rd party maps vendor and would like to create an overlay for this map to display arbitrary content. I already have callout pins created, but am looking to expand that with truly any kind of content I want to put over the map.
From what I understand, this could be done by using a scroll view and tiling, but it has been a very long time since I worked with that. Are there any projects I can take a look at to understand how to create a scroll view with tiled/reusable subviews?
Here's how I see it working - I receive a JSON from web service, it contains a class of an item I want to display and a position. The overlay instantiates appropriate views and adds them over the map, potentially reusing and managing appearance/disappearance of components as the user scrolls the map.
Maybe there are already some mechanism built into iOS to handle overlays for arbitrary content?
I am building an iOS app with the following view controllers:
1) ProductViewController - displays a carousel of products. When the user rotates to a product, the user can pick a button to see details of the product in view or another button to add the product to a shopping cart
2) HistoryViewController - displays detailed history about the products on a vertically scrolling timeline (Implemented using UIScrollView).
3) GameViewController - initiates a game where the user can play a trivia game where he scrolls through a set of views using back and forth arrow buttons (there are about 20 of these)
OK so much for the setup... here is the crux of my design problem:
I want to create popup messages for the user when the user gets to certain key points in the app. Lets call these key points "anchor points"
So for example the popup appears as soon as the user sees the 3rd product in the carousel view (i.e. in ProductViewController)
The popup appears again when the user gets halfway down the HistoryView (in HistoryViewController)
The popup appears again when the user gets to sees 7 items in GameViewController.
I want to add these "anchor points" in a flexible manner so I can easily change those places in the app where the popup appears (with minimal code change and mainly through config)
Q1) What would be the best way or design pattern to use to go about this design?
Q2) As a later enhancement I want to use some of the anchor points as key anchor points where if a user has gone through a certain number of key anchor points I can send the user a special message.
Thanks in advance for your help!
I'd probably think about having a separate controller (maybe a singleton) to own the knowledge for this. It deals with any configuration and the number of triggers required before any message is shown.
The other controllers in the app shouldn't know about counts or what things are being monitored for, so notifications are a good option. Define a set of notifications (for the types of events which go into making your anchor points) and have all of your controllers post the notifications as events happen.
Your separate controller deals with observing the notifications, counting and displaying the messages. If the display is as alerts or modal display it's easy. If not, the controller should have a link to the root view controller so it can get the current top controller (alert or modal is preferable).
Here is my answer, hopefully I understood the question correctly and this helps.
Create a popup manager class and initiate where ever it needs to be created first(app delegate?) to keep track of the user progression, and have the popup manager class pop alert messages to let user know of the surprise you have for them.
I have a view with 3 buttons (Europe, Asia, America) and a MKMapView.
If one of these buttons was clicked, i need to show the specific continent.
In
MKGeometry.h (Mapkit Framework)
there is a constant
MKMapRectWorld
which i can use to show the whole world.
Is there something similar for continents?
If not, what is the best way to determine all informations i need for creating a MKCoordinateRegion?
Use Google Earth or Goole Maps to work out the lat/long boundaries and then call setRegion on your map view.