Does the UIViewController or UINavigationController determine the size of its view?

I have several UIViewControllers loaded via the UINavigationController where I override the loadView and customize the custom view to display. I'm having problems adjusting the frames of some of the subzones and, possibly, the presentation itself. I think that either the UINavigationController or the UIViewController can make this view fill the screen when displayed.

I am wondering if and / or when the size of the view is set. And if this happens, then does the presentation frame set or does it differently.

Thank.

Update: I just noticed, working through this, that I am creating a new UINavigationController using this loadView method:

- (void)loadView
{
  UIView *view = [[UIView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 10.0f, 10.0f)];
  [view setBackgroundColor:[UIColor redColor]];
  self.view = view;
  [view release];
}

, , . , ? ?

+5
2

UIViewControllers , UINavigationController , UINavigationBar, 44.0f.

, self.view = view;. addSubview:, . logancautrell , .

+3

UINavigationController ViewController . :

pushViewController: :

viewController . , . . YES, ; . , ( ) .

, , VC-, . ​​, , .

+9

All Articles