iOS 9 Segue Causes App To Freeze (no crash or error thrown)
So basically the segue was freezing because of the UITextView
's I was using in the destinationViewController
. The following fixed the issue:
- Delete all
UITextView
's - Add new UITextView's
- you must leave the default lorem imposed text and change this programmatically in the
viewDidLoad()
- you must leave the default lorem imposed text and change this programmatically in the
This was the fix for me, and from the research I have done on the issue it seems this is a bug in iOS 9 and Xcode 7.
Cheers!
NOTE: Removing the text in the UITextView (or making it longer then ~12 characters) is sufficient to work around it, no need to delete and recreate them. This is fixed in Xcode 7.1.1 and later.
performSegueWithIdentifier won't push view
There seems to be a bug in iOS 9 and Xcode 7 where if you have a UITextView with placeholder text, it prevents the segue from being triggered.
More explanation in the following answer:
iOS 9 Segue Causes App To Freeze (no crash or error thrown)
To fix it, try removing the placeholder text for the UITextView
iOS Swift 2.0 UITextView freezes app depending on text
As suggested in the comments there seems to be a bug in Xcode 7 in combination with iOS9.
I ended up recreating the entire view, the problem did not occur again.
Swift: PrepareForSegue running but not loading ViewController
Ok so after looking high and low for errors in classes, delegates etc it turns out it's an error in Swift/XCode itself.
The culprit is simply the TextView on the page which needs to have its default text set to blank in order for the page to load. Any default text needs to be set in the viewDidLoad instead.
The full solution is contained here - iOS 9 Segue Causes App To Freeze (no crash or error thrown)
It would still be good to know if there is any way to see a log of errors thrown during view init but in this case it all comes down to an insignificant element on the view.
Related Topics
Error: Error Domain=Nsurlerrordomain Code=-1001 "The Request Timed Out."
Swift 3: Type 'Any' Has No Subscript Members
Libraries Not Found When Using Cocoapods with iOS Logic Tests
How to Disable Rotation in React Native
How to Get an Iphone's Device Name
Add Custom Controls to Avplayer in Swift
Does Swift Support Implicit Conversion
Why Is Uitextfield.Text an Optional
Removing Duplicates from Array of Custom Objects Swift
Firebase Cloud Messaging - Send Message to All Users
Swift iOS Check If Remote Push Notifications Are Enabled in iOS9 and iOS10