Quote:
Originally Posted by Duncan C
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.
i want the past 4 hours of my life back!
thanks again!!