Guten Morgen zusammen,
habe vor ein paar Monaten eine App auf iOS 5 implementiert. Diese läuft ohne jegliches Problem auf iOS 5.
Nun hat mir eine Kollege geschrieben, dass er das App auf iOS 6 nicht zum Laufen bekommt.
Nun habe ich mir Xcode neu installiert und das App geöffnet. Hab das Developement Target auf iOS 6 gestellt und im iPad 6.0 Simulator gestartet.
Dabei kommt direkt beim Start dieser Fehler:
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIView: 0x7487610; frame = (20 0; 748 1024); autoresize = W+H; layer = <CALayer: 0x7487670>> is associated with <FirstView: 0x7489cf0>. Clear this association before associating this view with <FirstView: 0x7471f10>.'
Im Appdalegate erstelle ich einen FirstView und füge diesem einer Tabbar hinzu:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
FirstView *addView = [[FirstView alloc] initWithNibName:@"FirstView" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:addView, nil];
self.window.rootViewController = self.tabBarController;
Die initWithNibName:bundle: sieht folgendermaßen aus:
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
if(self.title == nil) self.title = @"Welcome";
self.tabBarItem.image = [UIImage imageNamed:@""];
[self registerDefaults];
}
Habe die Zeile: self = [super init...] auch schon auskommentiert und es kommt der gleiche Fehler.
Kann sich jemand erklären wieso dieser Fehler in iOS 6 passiert?
Vielen Dank und viele Grüße
Chris
habe vor ein paar Monaten eine App auf iOS 5 implementiert. Diese läuft ohne jegliches Problem auf iOS 5.
Nun hat mir eine Kollege geschrieben, dass er das App auf iOS 6 nicht zum Laufen bekommt.
Nun habe ich mir Xcode neu installiert und das App geöffnet. Hab das Developement Target auf iOS 6 gestellt und im iPad 6.0 Simulator gestartet.
Dabei kommt direkt beim Start dieser Fehler:
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIView: 0x7487610; frame = (20 0; 748 1024); autoresize = W+H; layer = <CALayer: 0x7487670>> is associated with <FirstView: 0x7489cf0>. Clear this association before associating this view with <FirstView: 0x7471f10>.'
Im Appdalegate erstelle ich einen FirstView und füge diesem einer Tabbar hinzu:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window makeKeyAndVisible];
FirstView *addView = [[FirstView alloc] initWithNibName:@"FirstView" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:addView, nil];
self.window.rootViewController = self.tabBarController;
Die initWithNibName:bundle: sieht folgendermaßen aus:
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
if(self.title == nil) self.title = @"Welcome";
self.tabBarItem.image = [UIImage imageNamed:@""];
[self registerDefaults];
}
Habe die Zeile: self = [super init...] auch schon auskommentiert und es kommt der gleiche Fehler.
Kann sich jemand erklären wieso dieser Fehler in iOS 6 passiert?
Vielen Dank und viele Grüße
Chris