On Apr 15, 2011, at 11:11 AM, Jon Sigman wrote:

> In iOS 4.3, I have an app that uses CALayers to draw small circles on the 
> screen 
> like so:
> 
>  CALayer *_layer = [[CALayer alloc] init];
>  [_layer setDelegate:self];
>  [_layer setBounds:CGRectMake( 0,0,100,100 )];
>  [_layer setNeedsDisplay];
> 
> Is there a way I can draw text into the circle regions? I'd like to label 
> them.

What is 'self' in the code above? Having the delegate draw the text would be 
the simplest thing you can do. Next simplest would be to add a CATextLayer 
sublayer. At a higher level however, you could do the exact same thing with 
UIViews and use UILabel for your labels (which since they do less work for text 
layout are generally faster).

--
David Duncan

_______________________________________________

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