【问题标题】:iPhone: increasing size of view frame in a UItabbarcontroller?iPhone:在 UItabbar 控制器中增加视图框架的大小?
【发布时间】:2010-12-28 23:47:54
【问题描述】:

我目前定义了一个 UITabBarController,标签栏向下移动了几个像素以使其更薄

self.tabBarController = [[UITabBarController alloc] init];
  self.tabBarController.tabBar.frame=CGRectMake(0,self.window.bounds.size.height-38.5,self.window.bounds.size.width,50);

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

然后我有一个 UIViewController 对象分配给第一个选项卡使用:

    Home *home = [[Home alloc] initWithNibName:@"Home" bundle:nil];
    UINavigationController *nHome = [[UINavigationController alloc] initWithRootViewController:home]; 
nHome.tabBarItem.image=[UIImage imageNamed:@"home.png"]; 
[tabBarController setViewControllers:[NSArray arrayWithObjects:nHome,nil]];

因此,tabbarcontroller 和视图之间有一小段空间。有人可以告诉我如何摆脱这个空间吗?

【问题讨论】:

    标签: iphone objective-c uiviewcontroller uitableview


    【解决方案1】:

    就像你向下移动标签栏一样,你也必须向下移动视图。

    【讨论】:

    • 我需要访问什么方法/对象框架才能做到这一点?
    猜你喜欢
    • 2018-03-06
    • 2015-12-08
    • 1970-01-01
    • 2017-12-02
    • 1970-01-01
    • 2016-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多