0

I am creating an app using iOS 5, and I want to work as follows:

MainViewController w/ NavigationBar, and i set on viewDidLoad:

- (void)viewDidLoad
{
    [super viewDidLoad];

    NavViewController *nav = [[NavViewController alloc] init];
    [self addChildViewController:nav];
    [self.view addSubview:nav.view];
}

Like a "partial view" with some nav controls (my own/custom toolbar), and at NavViewController:

- (void)viewDidLoad
{
    [super viewDidLoad];
    CGRect viewRect = CGRectMake(0, 0, 320, 200);
    self.view.frame = viewRect;
    self.view.backgroundColor = [UIColor redColor];
}

At this point I have MainViewController with a navigation subview and still have space (in MainViewController view) that another subview can be added using the actions NavViewController.

Is there a serious flaw in this logic? or I can keep developing ?

Thnks a lot.

Amar
  • 13,202
  • 7
  • 53
  • 71
Jonny
  • 408
  • 4
  • 12

0 Answers0