Wow so much wrong with this code :-)
First you are missing a @property
declaration in your AddressAnnotation
@property (nonatomic,assign) CLLocationCoordinate2D coordinate;
In the subtitle method you do this:
return @"%@",stitle;
But this is Objective-C and not Python, so you might want to change this to:
return stitle;
Then your initWithCoordinate is completely wrong. You do not initialize super. This is better:
-(id) initWithCoordinate: (CLLocationCoordinate2D) c
{
if ((self = [super init]) != nil) {
coordinate=c;
NSLog(@"%f,%f",c.latitude,c.longitude);
}
return self;
}
Try fixing that stuff first to see if it helps :-)
St3fan
2010-02-03 18:23:12