iPhone: How to set UIViewController frame?

前端 未结 3 2040
长发绾君心
长发绾君心 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:36

    @Nic i think when you are adding that other view, at that time you should define the other views frame size like this:

    Someviewcontroller *c = initWithNibName
    c.view.frame = CGRectMake(0, 0, 200, 200);
    [self addSubView:c];
    

    i dont know if this will work but it is something like this.

提交回复
热议问题