iPhone: How to set UIViewController frame?

前端 未结 3 2063
长发绾君心
长发绾君心 2020-12-31 02:09

I have a root UIViewController that I am adding other UIViewController\'s as subviews. Currently each of the subviews are too low down (covering up my custom build tabbar).

3条回答
  •  梦谈多话
    2020-12-31 02:41

    Then there's always...

    // Screen, less StatusBar
    CGRect l_RectFrame = [UIScreen mainScreen].applicationFrame;
    

    OR...

    // Entire Screen
    CGRect l_RectFrame = [UIScreen mainScreen].bounds;
    
    
    MyView *l_aView = [[MyView alloc] initWithFrame:l_RectFrame];
    ...
    

提交回复
热议问题