Re: UIButton events on a CALayer

2013-07-30 Thread David Duncan
On Jul 29, 2013, at 5:52 PM, Ian was here howlew...@yahoo.com wrote: I've added a UIButton to a CALayer. The button appears as it should, but the button won't send a touch event. I've Googled around on this subject, but haven't found a solution that works in this case. Has anyone come across

UIButton events on a CALayer

2013-07-29 Thread Ian was here
I've added a UIButton to a CALayer. The button appears as it should, but the button won't send a touch event. I've Googled around on this subject, but haven't found a solution that works in this case. Has anyone come across this issue? Below is the source. UIButton *prefsButton = [[UIButton

Re: UIButton events on a CALayer

2013-07-29 Thread Kyle Sluder
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 )];