我想制作一个显示 UIImage View 和 UIActivityIndictor 的启动屏幕,然后在应用程序完成加载后,它会淡入新 View ,我不知道如何使一个 View “淡入淡出”(如溶解)进入另一个 View ,我不确定如何“暂停”代码直到完成加载背景部分,有什么帮助吗? 非常感谢!
最佳答案
因此,下面的代码显示了 1 秒的启动屏幕,然后以动画方式溶解屏幕。
[UIView beginAnimations: @"Fade Out" context:nil];
// wait for time before begin, your splash screen shows for 1 second
[UIView setAnimationDelay:1.0];
// duration of animation, the splash screen dissolved in quarter of a second.
[UIView setAnimationDuration:0.25];
viewToDissolve.alpha = 0.0;
[UIView commitAnimations];
//animation complete, now show the main screen. you can use uinavigationviewcontroller or other methods.
关于ios - UIView切换过渡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14575975/