Reputation: 11201
I'm a newbie in Objective-C, and I'm trying to add Markers to a mapView in my Apple app.
In my class Map, I'm trying to add a function wich adds markers.
In Map.h I add:
- (void)setMarkers:(MKMapView *)mv;
And in Map.m:
- (void)setMarkers:(MKMapView *)mv
{
CLLocationCoordinate2D newCoord = { 38.989567, -1.856283};
MapPoint *mp = [[MapPoint alloc] initWithCoordinate:newCoord title:[NSString stringWithFormat:@"Azam Home"] subTitle:@"Home Sweet Home"];
[mv addAnnotation:mp];
}
But when I try to call this function:
[setMarkers mv:map];
I have this error:
Map.m:278:6: Use of undeclared identifier 'setMarkers'
What am I missing?
Thank you in advance.
Upvotes: 0
Views: 83