I'm writing a tab-based universal app where one of the tabs takes considerably much longer to load than the rest (approximately 5s), and it locks down the main thread while doing it.
Now, this specific tab is an image gallery, so it could be expected to take a little while to load and display the images, however, the delay occurs before I instantiate any of my variables... (The image loading is done on a separate thread anyway...)
I create my subviews etc. in the viewDidLoad
method, but the delay occurs somewhere after the init method and before the viewDidLoad
method.
(The delay is present even if I comment out everything in the viewDidLoad
method.)
The View Controller is initialized with a nib containing nothing but a UIScrollView
and a UIImagePickerController
...
Does anyone know what's being loaded/processed before the viewDidLoad
method?
This is a problem with loading UIImagePickerController on the phone while being attached to the xcode harness. This creates a longer than normal delay. Try testing on the device without being connected to the xcode debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With