Ich habe rund um Stackoverflow gesucht und ich bin nicht in der Lage, mein Problem zu beheben, ich habe den folgenden Code in meinem AppDelegate.m
:PushingViewController in AppDelegate Unbekannter Selektor zum Beispiel
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:storyboard bundle: nil];
InternetConnectionViewController *controller = (InternetConnectionViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: noInternet];
[navigationController pushViewController:controller animated:YES];
Aber ist mir ein Fehler geben. ..:
Uncaught exception: -[CustomSplitViewController pushViewController:animated:]: unrecognized selector sent to instance 0x17884860
2016-06-16 02:34:14.896 --[3340:1197655] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CustomSplitViewController pushViewController:animated:]: unrecognized selector sent to instance 0x17884860'
*** First throw call stack:
(0x20c6b91b 0x20406e17 0x20c712b5 0x20c6eee1 0x20b9a238 0x23005d 0xb1cb7f 0xb1cb6b 0xb21655 0x20c2db6d 0x20c2c067 0x20b7b229 0x20b7b015 0x2216bac9 0x2524d189 0x18abdb 0x20823873)
libc++abi.dylib: terminating with uncaught exception of type NSException
warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.
EDIT - UPDATE schaffe ich es zu erreichen und arbeitet nun ... aber wenn ich versuche, dies zu tun:
UINavigationController *navigationController = self.navigationController;
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
HomeViewController *controller = (HomeViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: viewC];
[navigationController pushViewController:controller animated:YES];
im InternetViewController es gibt mir die folgende Fehlermeldung:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationController setPanGestureEnabled:]: unrecognized selector sent to instance 0x16942a00'
Ist es möglich, dass rootViewController 'CustomSplitViewController' ist, die nicht vom Typ' UINavigationController 'ist? – gabbler
Wie in den Fehler gesehen, ist dies möglich, ich habe zwei verschiedene Zeiten, wenn der InternetConnectionViewController angezeigt wird, wenn der Benutzer angemeldet ist, wird es in der CustomSplitViewControlIr, wenn es nicht in der LoginViewController – ZetaPR
Ich führe einige Tests und das ist nur passiert wenn ich in CustomSplitViewController bin – ZetaPR