• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: How to (slowly) rotate a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to (slowly) rotate a view


  • Subject: RE: How to (slowly) rotate a view
  • From: Julius Oklamcak <email@hidden>
  • Date: Sun, 05 Aug 2012 15:57:25 -0400

FWIW: UIView sets the delegate of its CALayer to itself - one of the things
that it appears to do is to disable any implicit animations. If you add your
own CALayer to a UIView's CALayer, then you're in full control. As already
pointed out, it's easier using one of the UIView animation class methods to
animate UIView stuff... :)

> I use this code (iOS 5.1):
>   CGAffineTransform m = { c, +s, -s, c, 0, 0 };    //    rotation, s =
sin(angle), c = cos(angle)
>   CALayer *layer = self.view.layer;    //    view is UIView, self is
subclass of UIViewController
>   [ CATransaction begin];
>   [ CATransaction setAnimationDuration: 9 ];
>   [ layer setAffineTransform: m ];
>   [ CATransaction commit];
>
> The view rotates ok, but does it instantly, instead of taking 9 seconds.
>
> What am I doing wrong?

_______________________________________________

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

References: 
 >How to (slowly) rotate a view (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to (slowly) rotate a view (From: Kyle Sluder <email@hidden>)
 >Re: How to (slowly) rotate a view (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: How to (slowly) rotate a view
  • Next by Date: How to display tool-tip on demand
  • Previous by thread: Re: How to (slowly) rotate a view
  • Next by thread: Re: How to (slowly) rotate a view
  • Index(es):
    • Date
    • Thread