gpt4 book ai didi

iOS启动画面动画

转载 作者:可可西里 更新时间:2023-11-01 04:15:36 24 4
gpt4 key购买 nike

在我的应用程序中,我希望启动画面具有动画效果我正在使用以下代码,但动画无法正常工作。

UIImageView *splashScreen = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"Default.png"]];
[self.window.rootViewController.view addSubview: splashScreen];

[self.window makeKeyAndVisible];

NSLog(@"begin splash");
[UIView animateWithDuration: 0.2
delay: 0.5
options: UIViewAnimationOptionCurveEaseOut
animations: ^{splashScreen.alpha = 0.0;
}
completion: ^ (BOOL finished) {
[splashScreen removeFromSuperview];
NSLog(@"end splash");
}
];

最佳答案

您不能为启动图像设置动画,但您可以等到应用启动并添加您自己的带有动画的 View 。

关于iOS启动画面动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21429346/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com