IOS: turn off camera
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 befo开发者_运维技巧re splashscreen disappear. Is it possible?
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.
精彩评论