I am trying to write a multi-user application in iOS and itβs really a little hard ... I have set up a new project and I have rootViewController running appDelegate. In turn, the rootViewController is trying to load and display my first view of the content, although I seem to have gotten into some kind of endless loop, I hope someone here may have a hunch why ...
-(void)viewDidLoad { // Load up new instance of view TopLevelViewController *topLevelController = [[TopLevelViewController alloc] initWithNibName:@"TopLevelView" bundle:nil]; // Hand off viewController reference to root controller self.topLevelViewController = topLevelController; // Display the view [self.view insertSubview:topLevelController.view atIndex:0]; // Release viewController [topLevelController release]; [super viewDidLoad]; }
Above is my viewViewDoadLoad method: my rootViewController, although every time it executes insertSubview it returns to the top and does it all again. I am a little confused since I based this code almost the same on the tutorial I followed and it worked beautifully ... which makes me think that the problem should be in another place, although I could not think where.
Appreciate any understanding!
source share