Undoubtedly another silly question, as, once again, I'm missing something fundamental no doubt.
I have the following in my header file:
#import <UIKit/UIKit.h>
#import "CRPUserNameViewController.h"
#import "CRPLegalViewController.h"
#import "CRPMainInformationViewController.h"
@interface CRPInitialOpenViewController : UIViewController
@property (strong, nonatomic) CRPUserNameViewController *vcUsername;
@property (strong, nonatomic) CRPLegalViewController *vcLegal;
@property (strong, nonatomic) CRPMainInformationViewController *vcMain;
@property (strong, nonatomic) UINavigationController *ncMain;
@end
I'm simply trying to get a Navigation Controller
to load and become the rootViewController
replacing the current UIViewController
with the following code:
self.view.backgroundColor = [UIColor blueColor];
_vcMain = [[CRPMainInformationViewController alloc] initWithNibName:nil bundle:nil];
_ncMain = [[UINavigationController alloc] initWithRootViewController:_vcMain]
self.view.window.rootViewController = _ncMain;
[self.view.window addSubview:_ncMain.view];
Shouldn't be that hard!! It seemed to work before! Even if I add:
[self.view removeFromSuperview];
I cannot see the Navigation Controller
. I'm adding the blue background just to make sure if it is still there!
What am I missing as once again it's driving me mad? How can I use Core Data with no trouble, but not get the Navigation Controller
to show. Sigh!
Thanks in advance.