Using a storyboard
in Xcode, I have an application that worked nicely, but after latest Xcode update (IOS 9), the app stucks on the splash screen.
DidfinishLaunchingWithOptions
is succesfully called and reaches the end of the function, but the initial viewcontroller is not being loaded.
If I switch the initial view controller to another screen, it works fine..
How can it be that the initial view controller is not loaded for the one screen, and it does get loaded if I set it on the second screen?
I first thought it had perhaps to do with constraints, or UI elements, but even after resetting constraints and removing the UI elements (which are just a set of buttons) still the same problem. There is only basic code in the viewcontroller.m .. (and it is not being called because I have console logs in every function)
Anybody with the same problem or a solution?
Edit 1: It seems that it is caused by one of the UI elements, after removing them all, the view does load.. now trying to add them one by one to see what causes the error.
Edit 2: I tracked the error to one imageview plus textview in the view, without the imageview and textview the view loads, with the image and textview it does not. Selecting a different image for the imageview does not seem to matter. Trying to find out why this imageview or textview is giving errors.
Edit 3: (not applicable anymore) The view in question has 4 images and 4 textviews in a grid, it seems that the images press away the textviews, and when this happens, the view does not load. (perhaps some constraints cannot be resolved..)
Edit 4:
The view looks like this (I cannot post screenshot due to NDA)
Image | Image
Textview | Textview
--------------------------------------
Image | Image
Textview | Textview
If we use for all Textviews the same text, it works, if however we change the up-right Textview shorter text, it stucks and does not load..
Is this a bug?? I am really lost.. I repeated the same experiment 3 times, and each time I set the text to the short variant it does not work, for the a bit longer text value it does work..
Edit 5, problem: text cannot be too small
When we set the text of one of the four TextViews to a string that is smaller than ten characters, the view does not load. If we use strings that are bigger than ten characters (any string), the view loads.
This is a very very weird bug, we are now trying to change the bounding box sizes of the textviews, to see if it has something to do with that.
With a string of 9 characters, the view refuses to load. With 10 characters it loads fine, no problem at all. There are no constraint issues whatshowever.
When we use spaces to make it at least 10 characters, everything works fine...
This is definately a bug..
See Question&Answers more detail:
os