Re: Leopard problem: rotating buttons
Re: Leopard problem: rotating buttons
- Subject: Re: Leopard problem: rotating buttons
- From: Bill Dudney <email@hidden>
- Date: Sun, 4 Nov 2007 05:55:01 -0700
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@hidden
Suitable Systems http://www.suitable.com/
1 Centre Street, Suite 204 (781) 665-0053
Wakefield, MA 01880-2400
_______________________________________________
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