On Mon, Jul 29, 2013, at 05:52 PM, Ian was here wrote:
> I've added a UIButton to a CALayer.

Huh? Views and layers are separate concepts. Views own layers; you can't
add a button to a layer.

> CALayer *prefsLayer = [prefsButton layer];
> 
> [prefsLayer setFrame:CGRectMake( x, y, 50.0, 40.0 )];
> [controlBarLayer addSublayer:prefsLayer];

Do not do this. UIView manages its layer.

Please review the View Programming Guide for iOS:
http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/WindowsandViews/WindowsandViews.html

--Kyle Sluder

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to