2008/11/14 David Duncan <[EMAIL PROTECTED]>: > On Nov 14, 2008, at 8:10 AM, Fabrizio Guglielmino wrote: > >> in some previous posts I was looking for information about CALayer >> rotation and now I can rotate layer using core animation. >> This mail it's about a strange behaviour, in my simple test I have a >> single View and a little image loaded as content of main layer. >> in the bottom of View there is a button and when I press this button >> rotation starts. The strange behaviour is that also the button rotate >> but I set bounds and position of CALafer to be in the middle of the >> view and half size of it. > > > When you configure a view to be layer backed (setWantsLayer:YES) all > subviews of that view become layer backed as well. Any transforms (in this > case rotation) that you apply to that layer also affect all sublayers (which > the layer for your button is). > > If you don't want the button to rotation, then you need to place it outside > of the view/layer that is being rotated. > -- > David Duncan > Apple DTS Animation and Printing > >
Thanks for the reply. Sorry but I forgot to say my application is for iPhone so I don't need setWantsLayer:YES, I don't think this make the difference, right? So, if I understand, I can make a second view outside the first view/layer with the button (and eventually other controls) and this will not affected of any animations? If it's true I had not understood the relation between layer and view, now it's clear. Thank You again Fabrizio _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [EMAIL PROTECTED]
