gpt4 book ai didi

iphone - 当我在顶部使用 TabBarController 时在底部显示空白

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:41:17 28 4
gpt4 key购买 nike

<分区>

enter image description here

当我在屏幕顶部有 UITabBarController 时,底部出现空白。在 iOS7 中,它使用此代码工作

       self.edgesForExtendedLayout=UIRectEdgeBottom;
self.extendedLayoutIncludesOpaqueBars = YES;

//在 ios 6 中获得空白空间的地方。下面是我用来显示标签栏的代码

    appDelegate.tabBarController.tabBar.frame = CGRectMake(0, 20, 320, 50);
appDelegate.tabBarController.delegate=self;

UIView *view=[[UIView alloc]initWithFrame:CGRectMake(0, -20, 320, 600)];

viewControllers = [[NSMutableArray alloc] init];

TagViewController *view1 = [[TagViewController alloc] init];
UINavigationController *nav1=[[UINavigationController alloc]initWithRootViewController:view1];
[viewControllers addObject:nav1];

ContactsViewController *view2 = [[ContactsViewController alloc] init];
UINavigationController *nav2=[[UINavigationController alloc]initWithRootViewController:view2];
[viewControllers addObject:nav2];

MessagesViewController *view3 = [[MessagesViewController alloc] init];
UINavigationController *nav3=[[UINavigationController alloc]initWithRootViewController:view3];
[viewControllers addObject:nav3];

RewardsViewController *view4 = [[RewardsViewController alloc] init];
UINavigationController *nav4=[[UINavigationController alloc]initWithRootViewController:view4];
[viewControllers addObject:nav4];

SettingsViewController *view5 = [[SettingsViewController alloc] init];
UINavigationController *nav5=[[UINavigationController alloc]initWithRootViewController:view5];
[viewControllers addObject:nav5];

[appDelegate.tabBarController setViewControllers:viewControllers];

appDelegate.tabBarController.tabBarController.view.frame=CGRectMake(0, 0, 320, 480);
[view addSubview:appDelegate.tabBarController.view];

[self.view addSubview:view];

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com