开发者

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

开发者 https://www.devze.com 2023-03-18 04:01 出处:网络
I want to use NSTimer to call a method once the view is done rotating. How long does th开发者_如何学Pythone view take to rotate exactly? Thanks for your help!You can implement didRotateFromInterfaceOr

I want to use NSTimer to call a method once the view is done rotating. How long does th开发者_如何学Pythone view take to rotate exactly? Thanks for your help!


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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消