• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS Setting frame size for MKAnnotationView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS Setting frame size for MKAnnotationView


  • Subject: Re: iOS Setting frame size for MKAnnotationView
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 27 Jan 2011 11:33:54 -0800

On Thu, 27 Jan 2011 08:01:02 -0500, Philip Vallone <email@hidden> said:
>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"];

Well, that's why setting the frame of the variable "callout" has no effect. You can name the annotation view by the variable name "callout", but that doesn't magically turn it into the callout. It is still the annotation view (i.e. the drawing of the pin). And since you are using the built-in pin-drawing annotation class, you can't even really customize that (except to set the color of the pin). m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iOS Setting frame size for MKAnnotationView
      • From: Philip Vallone <email@hidden>
  • Prev by Date: Re: UITableView: Delay select recognition
  • Next by Date: Re: Delay select recognition
  • Previous by thread: iOS Setting frame size for MKAnnotationView
  • Next by thread: Re: iOS Setting frame size for MKAnnotationView
  • Index(es):
    • Date
    • Thread