我想为我的手表应用程序实现启动画面。经过长时间的检查,我没有意识到手机和平板电脑没有像launchscreen.xib或者在info.plist中启动图像的方式
为了实现启动画面,我创建了一个新的启动界面,该界面仅在应用程序启动时出现。要做到这一点
生命周期我检查了this blog
之后在willActivate()函数中实现了
if first {
first = false
var timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("update"), userInfo: nil, repeats: false)
}else{
first = true
self.popController()
}
和我的更新功能
func update() {
self.pushControllerWithName("someListsController", context: nil)
}
我的观点是;我希望这个界面只在应用程序启动时显示,并且在返回此界面时,应用程序结束。