简体   繁体   English

方向改变

[英]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];
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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