gpt4 book ai didi

objective-c - UITabBar自定义

转载 作者:搜寻专家 更新时间:2023-10-30 19:40:49 25 4
gpt4 key购买 nike

这看起来不太可能,但有没有人知道一种方法:

  1. 在屏幕顶部放置一个 UITabBar
  2. 改变它的高度

欢迎大家推荐私有(private)API方法

最佳答案

您不需要私有(private) API,只需在您的 applicationDidFinishLaunching 方法中尝试即可。

controller = [[UITabBarController alloc] initWithNibName:nil bundle:nil];

HeadlinesViewController *headlines = [[HeadlinesViewController alloc] init];
OpinionsViewController *opinions = [[OpinionsViewController alloc] init];

controller.viewControllers = [NSArray arrayWithObjects:headlines, opinions, nil];

// set your position , width and height there
controller.tabBar.frame = CGRectMake(0, 20, 320, 50);
[window addSubview:controller.view ];
[window makeKeyAndVisible];

关于objective-c - UITabBar自定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2568727/

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