How can I detect the start of a rotation and the end of the rotation on these devices?
EDIT: So after your answers, how can I detect the begining and ending of the orientation change.
You can implement the following two methods in your UIViewController.
To detect a start of a rotation, implement willRotateToInterfaceOrientation:duration: and to detect the end implment didRotateFromInterfaceOrientation: .
i.e.
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
NSLog(@"I am starting to rotate");
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
NSLog(@"I have finished rotating");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With