Jack Humphries
Jack Humphries

Reputation: 13267

How long does it exactly take for a view to rotate in iOS?

I want to use NSTimer to call a method once the view is done rotating. How long does the view take to rotate exactly? Thanks for your help!

Upvotes: 1

Views: 132

Answers (2)

Jacob Sharf
Jacob Sharf

Reputation: 250

you don't have to use a timer.

in apple's documentation there's an even trigger which is fired after the iphone rotates

see here:

http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/didRotateFromInterfaceOrientation:

I believe you can just implement this method:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

Upvotes: 1

dasdom
dasdom

Reputation: 14073

You can implement didRotateFromInterfaceOrientation: and put your code in there.

Upvotes: 2

Related Questions