Well after 40 safari windows being open and realizing that most other forums are just scrapes from StackOverflow.com i've given up and come here after thinking i could figure this out myself.
my mkmapview doesn't call the delegate for this function:
Well after 40 safari windows being open and realizing that most other forums are just scrapes from StackOverflow.com i've given up and come here after thinking i could figure this out myself.
my mkmapview doesn't call the delegate for this function:
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
i set a breakpoint where you asked me to, i see it has an address and is not nil. Annotations draw as red pins, i can set region and span without a problem and the map updates my user location without an issue.
setting a breakpoint in that one delegate method though never ever gets hit.
i do not think i am implementing any other MKMapView delegate methods. I have an MKAnnotation delegate and a CCLocationManager delegate in other classes and i know that these are getting hit.
i've inspected IB and re-delegated to "File's Owner", it still did not fix the problem.
i set a breakpoint where you asked me to, i see it has an address and is not nil. Annotations draw as red pins, i can set region and span without a problem and the map updates my user location without an issue.
setting a breakpoint in that one delegate method though never ever gets hit.
i do not think i am implementing any other MKMapView delegate methods. I have an MKAnnotation delegate and a CCLocationManager delegate in other classes and i know that these are getting hit.
i've inspected IB and re-delegated to "File's Owner", it still did not fix the problem.
i don't know if it would help to know the hierarchy in IB but it is:
Well after 40 safari windows being open and realizing that most other forums are just scrapes from StackOverflow.com i've given up and come here after thinking i could figure this out myself.
my mkmapview doesn't call the delegate for this function:
and in interface builder i have the mkmapview gameMap's delegate as file's owner.
please end my frustration i just want these damn pins to be the image "1.png"
I am not a very good proof-reader. If there are ANY differences in the parameters, names or capitalization of the method declaration, it won't get called. One thing I did notice is that your method declares the annotation property as type (id), and the method signature in the docs is for (id <MKAnnotation>), which is a pointer to an anonymous object that implements the <MKAnnotation> protocol. I don't think parameter type mismatches prevent methods from getting called (unlike C++) but I would change it anyway. In fact, I would suggest going to the XCode docs on the mapView:viewForAnnotation: method and copy and pasting the method declaration from the docs directly into your code.
BTW, set the breakpoint in the debugger at the beginning of your viewDidLoad again, and check the type of the gameMap instance variable. If it is pointing to some other object, that would do it.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
I am not a very good proof-reader. If there are ANY differences in the parameters, names or capitalization of the method declaration, it won't get called. One thing I did notice is that your method declares the annotation property as type (id), and the method signature in the docs is for (id <MKAnnotation>), which is a pointer to an anonymous object that implements the <MKAnnotation> protocol. I don't think parameter type mismatches prevent methods from getting called (unlike C++) but I would change it anyway. In fact, I would suggest going to the XCode docs on the mapView:viewForAnnotation: method and copy and pasting the method declaration from the docs directly into your code.
BTW, set the breakpoint in the debugger at the beginning of your viewDidLoad again, and check the type of the gameMap instance variable. If it is pointing to some other object, that would do it.
I got it. Well my first issue is i shouldn't just be copying sensitive methods like that from the internet haha and my second issue was i was setting the delegate in the viewDidLoad method when I hadn't even instantiated it yet.
There is another view that loads the map when it is finally ready. after instantiation i then set the delegate to self and it worked. i hope google indexes this for others to follow.