如何在images.xcassets中在应用程序内使用启动图像?
尝试这些没有运气:
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "LaunchImage")!)
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "LaunchImage.png")!)
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "640x960.png")!)
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
在主捆绑包中,启动图像具有其他名称表示
您可以使用以下方法加载它们:
UIImage *anImage = [UIImage imageNamed:@"LaunchImage-800-667h"];
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句