Terminating app due to uncaught exception'NSGenericException', reason: 'Push segues can only be used when the sourcecontroller is managed by an instance of UINavigationController.
這個(gè)錯(cuò)誤的意思是,在連接兩個(gè)viewController的時(shí)候卿嘲,使用了“push”的方式,但是源viewController不是UINavigationController的實(shí)例赏廓,所以異常,程序終止笼平。
解決這個(gè)錯(cuò)誤有兩種方法:
第一個(gè):是在用“Ctrl”連接兩個(gè)viewcontroller的時(shí)候亮蛔,不要用“push”的方式,而用“modal”的方式味榛。
第二個(gè):就是添加一個(gè)UINavigationController。