iOS:关闭相机
在我的应用程序中,我使用iphone相机,但是当我打开它时,进程非常低;然后我想在显示闪屏时开始该过程。 问题是当闪屏结束时我不想显示相机。 然后,当我显示闪屏时,我想启动相机进程并在闪屏消失之前退出它。是否可以?
In my app I use iphone camera, but the process is very low when I open it; then I want to start the process when I shows a splashscreen.
The problem is that when splashscreen ends I don't want to show camera.
Then while I show splashscreen I want to start process of camera and quit it before splashscreen disappear. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,苹果公司在其人机界面指南文档中特别建议不要使用闪屏。我不知道您的应用程序是否会因此被拒绝,但最好不要尝试。
其次,听起来您需要优化应用程序的启动,可能还有第一个视图控制器。为此,您需要推迟加载/初始化所有内容,直到实际需要为止(称为“延迟初始化”)。 applicationDidFinishLaunching 中的所有代码:在您的应用程序委托和视图控制器的 init 方法、loadView、viewDidLoad、viewWillAppear、viewDidAppear 中应该审查以后可以做的事情。
First up, Apple specifically advise against using splash screens in their Human Interface Guidelines document. I don't know if your app would get rejected for it, but best not to try.
Second, it sounds like you need to optimise the startup of your application and probably the first view controller. To do this, you need to put off loading/initialising everything you can until it's actually needed (known as "lazy initialisation). All code in applicationDidFinishLaunching: in your app delegate and your view controller's init method, loadView, viewDidLoad, viewWillAppear, viewDidAppear should be reviewed for stuff that could be done later.