0

I received the error: Thread 1, Signal SIGABRT when I ran my app and pressed the button when I had added a custom push segue for.

Error in log:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'

Here's the code for the custom segue

#import <UIKit/UIKit.h>

@interface PushNoAnimationSegue : UIStoryboardSegue

@end


 @implementation PushNoAnimationSegue

    -(void) perform{
        [[[self sourceViewController] navigationController] pushViewController:[self   destinationViewController] animated:NO];
    }

    @end

All outlets are accounted for and there don't seem to be any loose ones.

What's the issue and how do I fix this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
PHP Web Dev 101
  • 535
  • 2
  • 9
  • 21
  • For those who are fighting to figure out error in iOS 10, when using library/photos/media your app may be crashing with SIGABORT. You need to add some keys in Info.plist, check [this link.](http://stackoverflow.com/a/39631642/1223728) – Borzh Mar 31 '17 at 15:33

1 Answers1

1

That error indicates that you are trying to push a UINavigationController instance onto a UINavigationController. This is not allowed (as the error states). It seems like your storyboard is most likely not setup correctly. You can verify this by checking the type of [self destinationViewController], it should not be a UINavigationController.

Charles A.
  • 10,685
  • 1
  • 42
  • 39