Re: How to (slowly) rotate a view

2012-08-20 Thread Gerriet M. Denkmann
On 19 Aug 2012, at 00:18, Matt Neuburg m...@tidbits.com wrote: On Mon, 06 Aug 2012 00:11:39 +0700, Gerriet M. Denkmann gerr...@mdenkmann.de said: I use this code (iOS 5.1): CGAffineTransform m = { c, +s, -s, c, 0, 0 }; // rotation, s = sin(angle), c = cos(angle) CALayer

Re: How to (slowly) rotate a view

2012-08-18 Thread Matt Neuburg
On Mon, 06 Aug 2012 00:11:39 +0700, Gerriet M. Denkmann gerr...@mdenkmann.de said: 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

How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
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]; [

Re: How to (slowly) rotate a view

2012-08-05 Thread Kyle Sluder
On Aug 5, 2012, at 10:11 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 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

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 00:20, Kyle Sluder wrote: On Aug 5, 2012, at 10:11 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 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;

Re: How to (slowly) rotate a view

2012-08-05 Thread Kyle Sluder
On Aug 5, 2012, at 10:34 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I tried instead: //opacity is 0.5 [ CATransaction begin]; [ CATransaction setAnimationDuration: 9 ]; layer.opacity = 1; [ CATransaction commit]; [ CATransaction begin]; [

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 01:01, Kyle Sluder wrote: On Aug 5, 2012, at 10:34 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I tried instead: //opacity is 0.5 [ CATransaction begin]; [ CATransaction setAnimationDuration: 9 ]; layer.opacity = 1; [ CATransaction commit];

Re: How to (slowly) rotate a view

2012-08-05 Thread Richard Altenburg (Brainchild)
Something along these lines maybe?: [UIView animateWithDuration:durationSeconds animations:^ { [view setTransform:CGAffineTransformRotate([view transform], angleRadians)]; } ]; [[[Brainchild alloc] initWithName:@Richard Altenburg]

Re: How to (slowly) rotate a view

2012-08-05 Thread Gerriet M. Denkmann
On 6 Aug 2012, at 01:48, Richard Altenburg (Brainchild) wrote: [UIView animateWithDuration:durationSeconds animations:^ { [view setTransform:CGAffineTransformRotate([view transform], angleRadians)]; } ]; Thanks! (or: Dank U well)

Re: How to (slowly) rotate a view

2012-08-05 Thread Richard Altenburg (Brainchild)
You are most welcome. It took me a while to find the cleanest solution for rotating views in my project and I wanted to give it to you to save you some headaches... Mit freundlichem Gruß. [[[Brainchild alloc] initWithName:@Richard Altenburg] saysBestRegards]; Op 5 aug. 2012, om 21:08 heeft

RE: How to (slowly) rotate a view

2012-08-05 Thread Julius Oklamcak
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