NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController

后端 未结 11 691

so I\'m making an app with 5 view controllers, the first is embedded in a UINavigationController and the segue between the first 4 view controllers works fine. However intro

11条回答
  •  没有蜡笔的小新
    2020-12-07 18:00

    in my particular case, the place to call into a subset of views that required a push was only from code and was not connectable via IB. The original project to create the subset of views was started with a dedicated button and thus was IB'able.

    No segue was configurable, and thus any push resulted in this error.

    My solution was simple: [self showViewController:targetViewController sender:self];

提交回复
热议问题