+1  A: 

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
Lol! I can't believe that! The most ironic thing is that I literally copied and pasted the code from a tutorial.
Flafla2
Still though, that didn't do the trick...
Flafla2
A: 

I'm new to Objective C but I think the prototype for your delegate function should be :

- (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id )annotation{
    MKAnnotationView *annView;

The delegate name is mapView:viewForAnnotation:, not map:viewForAnnotation:

FenchKiss Dev
Thanks for the response! Well, it doesn't necessarily have to be mapView, because what it is doing in that action is it is <b>creating</b> an annotation view. This can be anything you want(the name).
Flafla2
No I mean the delegate name not the variable name.The annotation view is created in a delegate function called by the framework. I'm pretty sure your delegate name is wrong "map:viewForAnnotation:" instead of "mapView: viewForAnnotation:".If I'm right you're function is never called. That why you end up with the default annotation view. Have you tried to set a breakpoint on the following line :"if(annView == nil)".
FenchKiss Dev