Im using the Google Map's SDK and want the user to fill out some information about a marker.
So the user presses on the map to place a marker, I want a small pop up to come over the map and ask the user to input some text about the location. Should that pop up be its own view controller or should it be a UIView and subview the mapController?
Related
In my iOS application, I want to add a custom button at the center of the navigation bar (that the user will be able to swipe left-right to change active topic).
When I searched the web, found that images and title text can be located at the center, the other buttons such back, done, etc. are located at the corners.
Thank you
I have my screen split; 50% for the map and 50% for a list of elements. As the list of elements is scroll, the annotation will pop around the map based off whichever element is in the top of the list. This part is working fine.
However, when the user taps on the map, I don't want the annotation to disappear. I really want the user's tap to interactive with the MapView instead of the AnnotationView.
Is this possible? If so, can someone point me in the right direction? Thanks.
You have a couple of options:
You can intercept the built-in tap gesture recognizer or add a custom tap gesture recognizer. When the user taps the map, check if an annotation is selected. If one is selected, call mapView:selectAnnotation: to keep it selected.
You can call mapView:selectAnnotation: in the relevant mapView:deselectAnnotation: or mapView:deselectAnnotationView: delegate method.
I've gotten Tweet sheets to appear in my app, but I'd like to spawn them only when a user presses the particular "Tweet" button in a UIActionSheet.
Currently, my UIActionSheet is being shown in the main view after the user presses a Rounded Rect Button. I would like to change this button to be Apple's "standard" share method, which is using the button with the square image and the arrow jumping out of it, as shown below
Where could I find the image for the button to do this, or is the button already built into XCode?
I hope I'm being clear enough.
Thank you.
You have to just create toolbar item with Bar Button Item. In Attributes Inpector choose 'Action' type of your button.
Attach selector/method from your rounded rect button to this button.
HTH!
How can I have my MKMapView follow my user around until they scroll, and then have a button to follow the user around again?
Here is the flow I would like it to have.
View Loads:
Zoom in and center on the users current location, then follow the user around.
User scrolls:
Do nothing until a button is pressed
Button pressed:
Same code as 'View Loads'
Your location manager is continuously providing you with new location information via the delegate method locationManager:didUpdateToLocation:fromLocation:. Change the map's region whenever you get an update. Before doing so, check a flag ("shouldFollowCurrentLocation" or similar) that is set by default. You will unset the flag when your map view delegate gets mapView:regionWillChangeAnimated: (you will of course have to keep track of the occasions when you cause the region to change programmatically) and reset it in the button's action method.
I am working on an iPhone app in which I am implementing a map view. When the map loads, a purple pin is displayed at the current location. My problem is that I want to show the current location on a new view when the user touches this purple pin.
Any idea?
Please help.
Thanks,
Aaryan
When a user taps an annotation pin, callout annotation and accessory views can be displayed. The callout accessory views can be controls (buttons) with associated actions.
If callout views will not meet your needs, you could instead put invisible buttons with your own actions over the pins on the map view.
In either case, you can display views, navigate, etc in the method(s) called by the button actions.