UITabBar的下半部分由电话本身覆盖

时间:2011-04-01 12:17:45

标签: uitabbarcontroller uitabbar cut

我有这个应用程序现在有3个屏幕。第一个屏幕有UItableView和NavigationController。第二个屏幕仍然是UITableView,从第一个屏幕向下钻取。在第三页上,我尝试调用tabbarcontroller,但是当视图出现时,我的tabbar被剪切为原始大小的一半。这是片段。

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
    // Custom initialization

}

[self.view addSubview:tabBarController.view];}

<!/ P>

任何人?提前致谢

1 个答案:

答案 0 :(得分:0)

  • (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {

if((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])){

// Custom initialization

}

[self.view addSubview:tabBarController.view];

[self.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];

}