Custom pin with title subtitle iphone - iphone

I have a mapview and i put an annotation which shows a custom title and subtitle pin.
When the mapview starts the pin is visible but the title and subtitle are not.
I have to press on the pin to show up the title and subtitle. Is it possible to show the title and subtitle without pressing the pin?

this is just a suggestion but you can try
[myCustomAnnotationView becomeFirstResponder];

you could use
MKMapView *mapView;
id<MKAnnotation> myAnnotation;
// initialize mapView and myAnnotation...
[mapView selectAnnotation:myAnnotation animated:YES]

http://www.iphonedevsdk.com/forum/iphone-sdk-development/19740-trigger-mkannotationview-callout-bubble.html#post110447
anyway guys seems to be a problem at xcode specific version check the above link. this is working

Related

Is it possible to display the address location on pin with out tap on pin?

In my application i have one requirement.i have the latitude and longitude values on cell in table view. when user tap on cell then automatically display the info(location address ) on pin(which pin is having the latitude and longitude values same as cell from table ). i am displaying the tableView and mapView in single view only in ipad.
when u add the pin, for your MKAnnotationView set annotationView.setSelected = YES;
this will enable the annotation view to display a callout bubble automatically
Yes it is possible.What you are looking for is adding Annotation to the mapview
A good tutorial here

Hide popup when annotation tapped on MapView

I'm creating an iPhone app that shows a large number of pins on a map. I need the app to push another view that will show lots of information for that location, when the pin is tapped.
In my viewDidAppear i have a piece of code that sets the title and subtitle values of the pin just for test purposes.
-(void)viewDidAppear:(BOOL)animated
{
pin.title = #"Some title";
pin.subtitle = #"Some subtitle";
}
in my didSelectAnnotationView delegate i have something along this lines
- (void)mapView:(MKMapView *)mapView
didSelectAnnotationView:(MKAnnotationView *)view
{
[self performSegueWithIdentifier:#"showPinDetails" sender:self];
}
Now, when i tap on the pin, a popover appears for a brief moment, showing the title and subtitle in a popup, and then the segue pushes the details view. When I tap the back buton to retun me to the map view, the popup is still visible.
How can I somehow completely hide or disable the popup? If i don't set the title and subtitle values the didSelectAnnotationView delegate doesn't get called at all. I will gladly post additional code if you need me to, I just wanted to keep things as simple as I could.
Am I doing this wrong? Should I use some different method to achieve what I need to do? Thanks
You are not setting canShowCallout
canShowCallout -> A Boolean value indicating whether the annotation view is able to display extra information in a callout bubble.
Discussion ->
If the value of this property is YES, a standard callout bubble is shown when the user taps a selected annotation view
For More info you can visit MKAnnotationView Class Reference
Ok, I was stupid, when adding pins all i needed to do is to set the pin property canShowCallout:
annotationView.canShowCallout = NO;

MapKit : Add custom callout

I want to add custom annotationView callout which contains
1. Title
2. subtitles
3. a button
The button can display on the right (rightCalloutAccessoryView) or left leftCalloutAccessoryViewsides of the callout. I want to add the button in the middle of the callout and under title->subtitle. How can I do?
There is no API for this. You could try not using the standard callout (canShowCallout = NO), catch the taps and drags on the AnnotationView manually and show your own UI by adding custom Views based on the position of the AnnotationView. This seems very fragile, though.

Not updating the annotation title and subtitle in mkMapView in iphone at appropriate time

I am showing my current location on mapView.It shows the blue dot.I want to add annotation on that blue so that it shows the latitude and longitude in title and subtitle of annotation but it shows null in both field for sometimes and after few minutes it shows the lat/long in title and subtitle.I want to show that lat/long with the load of view.Please help me regarding this to show the lat/long on annotation as quick as possible.
i startUpdatingLocation my locationManager in loadView rather than viewDidLoad and it works fine for me...

iPhone:Display UIPopoverController in MapView

I am working map app and I am display mapview in UIView that in which I display all locations in mapview.
Now I want to display UITableview inside UIPopoverController when I selected a mappin.
Is it possible in iPhone??
Does any have an idea to how to develop this functionality.
Thanks in advance.
If i understand your question, i think you can use the Delegate methods available for the AnnotationView
http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html
– mapView:annotationView:calloutAccessoryControlTapped:
In there you can check wich one is tapped and than open your UIPopOverController
Does this help you?