Re: How to (slowly) rotate a view

2012-08-20 Thread Gerriet M. Denkmann
On 19 Aug 2012, at 00:18, Matt Neuburg wrote: > On Mon, 06 Aug 2012 00:11:39 +0700, "Gerriet M. Denkmann" > 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;

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" 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 > subclass of U

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 method

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 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 we

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"] saysBest

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" > 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 Kyle Sluder
On Aug 5, 2012, at 10:34 AM, "Gerriet M. Denkmann" wrote: > I tried instead: >//opacity is 0.5 >[ CATransaction begin]; >[ CATransaction setAnimationDuration: 9 ]; >layer.opacity = 1; >[ CATransaction commit]; > >[ CATransaction begin]; >[ CATransaction setAnim

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" > 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;//vie

Re: How to (slowly) rotate a view

2012-08-05 Thread Kyle Sluder
On Aug 5, 2012, at 10:11 AM, "Gerriet M. Denkmann" 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 UIViewController >