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() This was the fix for me, and from the research I have done … Read more

How do I create a segue that can be called from a button that is created programmatically?

Here is how to set up a segue so that it can be called programmatically. Control drag from the ViewController icon in the first view controller to the second view controller. Click on the segue arrow between the two view controllers, and in the Attributes Inspector on the right, give the segue an Identifier (tableau … Read more

Instead of push segue how to replace view controller (or remove from navigation stack)?

To expand on the various segues above, this is my solution. It has the following advantages: Can work anywhere in the view stack, not just the top view (not sure if this is realistically ever needed or even technically possible to trigger, but hey it’s in there). It doesn’t cause a pop OR transition to … Read more

Prevent segue in prepareForSegue method?

It’s possible in iOS 6 and later: You have to implement the method – (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender In your view controller. You do your validation there, and if it’s OK then return YES; if it’s not then return NO; and the prepareForSegue is not called. Note that this method doesn’t get called automatically when triggering … Read more

tech