Did you call setNeedsDisplay for this view subclass anywhere? (Just after you make this view visible is a good place.)
hotpaw2
2010-08-30 17:05:00
Did you call setNeedsDisplay for this view subclass anywhere? (Just after you make this view visible is a good place.)
The problem turned out to be that my drawRect: method was never being called because the frame was not set to a non-zero size. Adding an initWithAnnotation: method to do this solved the problem.
- (id) initWithAnnotation: (id <MKAnnotation>) annotation reuseIdentifier: (NSString *) reuseIdentifier
{
self = [super initWithAnnotation: annotation reuseIdentifier: reuseIdentifier];
if (self != nil)
{
self.frame = CGRectMake(0, 0, 30, 30);
self.opaque = NO;
}
return self;
}