相关疑难解决方法(0)

iOS启动画面动画

在我的应用程序中,我希望启动画面动画我正在使用以下代码,但动画无效.

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");
                }
];
Run Code Online (Sandbox Code Playgroud)

animation splash-screen ios

5
推荐指数
2
解决办法
2万
查看次数

使用Swift在启动屏幕上显示应用程序版本

脚本

我想展示使用Swift制作的iOS 9应用程序的版本.

我做了什么

我知道如何获得版本(let version: String = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"] as! String)

我的主屏幕上也有自定义标签.

我的问题

我现在的问题是,不允许在启动/启动屏幕上使用自己的UIViewController.

许多应用程序在该屏幕上显示其版本.这就是为什么我认为必须有一种方法来做到这一点.

uiviewcontroller ios swift launch-screen

5
推荐指数
3
解决办法
5587
查看次数