简体   繁体   中英

orientation change

I need to show fade-in kind of transition effects while the view changes its orientation from one mode to other. Can anyone suggest me how to get that?

I would use an animation block inside of this method like so:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    [UIView beginAnimations:@"InterfaceFade" context:nil];
    [UIView setAnimationBeginsFromCurrentState:YES];
    [UIView setAnimationDuration:duration];

    // Change properties to animate here (Ex: view.alpha = 0.0)

    [UIView commitAnimations];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM