Sometimes you just have to take things as they are given, just like that. For example adding MKAnnotation protocol support all you have to do is create an instance variable called "coordinate":
@interface MyPointItem : NSObjectAs Apple documentation says:{
NSString *title;
NSInteger distance;
CLLocationCoordinate2D coordinate;
}
"An object that adopts this protocol must implement the coordinate
property."
There you are. As long as you remember, WHY you have a variable called "coordinate" INSTEAD OF "location". If you don't remember and apply Natural Naming to your code, your application will start crashing horribly for mysterious reasons...
No comments:
Post a Comment