ios – Application tried to present modally a view controller that has a parent view controller


Loading up a (very) old objective-c project, to do some bug fixes and it crashes out before I have gotten the chance to even load it to test, the line it crashes on is indicated below;

- (void)viewDidLoad {
     
    activeViewController = [self loadStartViewController];     
    [self.view addSubview:activeViewController.view]; //Crashing on this line
    [activeViewController viewDidAppear:NO];
   
}

the loadStartViewController method is;

- (UIViewController*) loadStartViewController {
    StartViewController *viewController = [StartViewController alloc];
    return viewController;
}

Appreciate this will likely need far further fixing, but wanted to get at least into the app first.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img