Hi,

I am having trouble setting the size of the "call out bubble" on my 
viewForAnnotation protocol. How can I set the frame size of the call out?

This line has no effect:

[callout setFrame:CGRectMake(0, 0, 240, 240)];

Here is my code:

- (MKAnnotationView *)mapView:(MKMapView *)MapView viewForAnnotation:(id 
<MKAnnotation>)annotation
{
        
        MKPinAnnotationView *callout = (MKPinAnnotationView *) [self.mapView 
dequeueReusableAnnotationViewWithIdentifier: @"PinIdentifier"];
        [callout setFrame:CGRectMake(0, 0, 240, 240)];
        if (callout == nil)     {
                
                callout = [[[MKPinAnnotationView alloc] initWithAnnotation: 
annotation reuseIdentifier: @"PinIdentifier"] autorelease];
                
        }else   {
                callout.annotation = annotation;
        }
        callout.pinColor = MKPinAnnotationColorGreen;
        callout.animatesDrop = YES;
        callout.draggable = YES;
        callout.canShowCallout = YES;
        callout.rightCalloutAccessoryView = [UIButton 
buttonWithType:UIButtonTypeDetailDisclosure];
        
        UIImage *image = [UIImage imageNamed:@"gps_add.png"];   
        UIImageView *imgView = [[[UIImageView alloc] initWithImage:image] 
autorelease];
        callout.leftCalloutAccessoryView = imgView;     
        
        return callout;
        
}

thanks,

Phil




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to