Skip navigation.
 
mlRe: Leopard problem: rotating buttons
FROM : Bill Dudney
DATE : Sun Nov 04 13:55:01 2007

Hi Daniel,

I looked and could not find it, I think the example was from WWDC 
2006. If you are paid ADC you can get to the session on itunes.

I went ahead and built a really simple app that has 2 buttons, one is 
layer backed (labeled beeper) the other is not (labeled rotate).  When 
you hit rotate the beeper button rotates an additional 15 degrees from 
where it is, when you hit beeper it beeps.

The UI is ugly but its not mean to be an example of nice UI :)

http://bill.dudney.net/roller/objc/resource/LayerBackedControls.zip

Is the url to grab the project.

There is a bug in IB with layer backed views, you should make the 
connections to and from the button before you turn on layer backing 
otherwise the button becomes fairly persistent about not being 
selected or connected to.

I'm not sure about why the button would not function after calling 
setWantsLayer: I've not experienced that but most of the time when I 
call that method I'm setting the view to use a layer I created. If I'm 
not going to set the view to use my layer I typically just use the 
switch in IB. Which theoretically should not be different than calling 
the method but in practice probably is a little different.

HTH,

-bd-
http://bill.dudney.net/roller/objc

> At 8:45 AM -0600 11/3/07, Bill Dudney wrote:

>> Hi Daniel,
>>
>> Try making the buttons layer backed and then set their rotation 
>> angle.

>
> I tried calling [viewItem setWantsLayer:YES] without any rotation, 
> but the buttons then wouldn't function, and the first time I showed 
> the views the contents were somewhat blurry and distorted 
> (subsequent displays were fine).
>

>> I've not tried it but I have seen a demo app that did a bunch of 
>> rotation and other even stranger things with controls that were 
>> layer backed.

>
> Any idea what the name of this demo was, or where I could find it?
>
>
> Thanks,
> Dan
>
> --
> Daniel T. Griscom            <email_removed>
> Suitable Systems              http://www.suitable.com/
> 1 Centre Street, Suite 204    (781) 665-0053
> Wakefield, MA  01880-2400

Related mailsAuthorDate
mlLeopard problem: rotating buttons Daniel Griscom Nov 3, 14:43
mlRe: Leopard problem: rotating buttons Daniel Griscom Nov 4, 04:23
mlRe: Leopard problem: rotating buttons Bill Dudney Nov 4, 13:55
mlRe: Leopard problem: rotating buttons Raffael Cavallaro Nov 4, 15:51
mlRe: Leopard problem: rotating buttons Daniel Griscom Nov 4, 16:49
mlRe: Leopard problem: rotating buttons Raffael Cavallaro Nov 4, 18:01
mlRe: Leopard problem: rotating buttons listposter Nov 5, 02:20
mlRe: Leopard problem: rotating buttons Bill Dudney Nov 7, 06:29