Tag: uitabbar

计算UITabBar的高度

我正在编写一个应用程序,使用UITabBar作为导航的一部分。 我还使用UIScrollView来呈现比屏幕通常可以处理的更多信息。 因此,我需要设置滚动视图来考虑UITabBar的高度,以便显示所有的信息。 有没有办法来计算UITabBar的height ?

更改UITabBar高度

我使用UITabBarController作为根视图,应用程序支持iOS 6及以上版本。 项目类层次如下。 UITabBarController – tab1 – UINavigationController – UIViewController – UIViewController . . – tab2 – UINavigationController – UIViewController – UIViewController . . . – tab3 – UIViewController – tab4 – UIViewController 我使用下面的代码来更改上面的层次结构中UIViewControllers(位于UINavigationController )之一的UITabBar高度。 CGRect tabbarFrame = self.tabBarController.tabBar.frame; tabbarFrame.size.height += 60; self.tabBarController.tabBar.frame = tabbarFrame; 但它不改变高度。 UITabBar以默认高度显示。 虽然logging它的值打印更改值如下所示。 <UITabBar: 0xb528f60; frame = (0 431; 320 […]

使用故事板时设置默认选项卡

任何人都可以告诉我如何设置在iOS中使用故事板时的默认选项卡。 我似乎无法弄清楚如何做到这一点。 谢谢

iOS 7 tabBar行,如何删除它?

苹果已经在iOS 7的tabBar上加了一条小小的线条,它应该在tabBar和UI之间作为阴影或淡入淡出 由于我使用的是定制的tabBar,因此这条线非常刺激。 你如何删除它? 请告诉我这是可能的,否则我需要重新devise我的整个应用程序大声笑…. / 问候 *编辑 用以下代码行解决了我的问题: [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];

如何隐藏在iOS中的animation标签栏?

所以我有一个连接到IBAction的button。 当我按下button时,我想用animation隐藏iOS应用程序中的标签栏。 这个[self setTabBarHidden:hidden animated:NO]; 或者这个[self.tabBarController setTabBarHidden:hidden animated:YES]; 不起作用。 这是我的代码没有animation: – (IBAction)picture1:(id)sender { [self.tabBarController.tabBar setHidden:YES]; } 任何帮助将不胜感激:D

未选中的UITabBar颜色?

我有一个UITabBar 5项。 我想更改所有项目的未选中的颜色。 这些项目没有在UIViewController类中声明(我构build它们并链接了Storyboard中的视图)。 有没有这样的代码: [[UITabBar appearance] set***UN***SelectedImageTintColor:[UIColor whiteColor]]; ?

iOS 11 iPhone X模拟器UITabBar图标和标题在顶部覆盖彼此

任何人在UITabBar组件周围的iPhone X模拟器的问题? 我似乎正在渲染的图标和标题在对方之上,我不知道如果我失去了什么,我也跑在iPhone 8模拟器,和一个实际的设备,它看起来很好,就像故事板。 iPhone X: iPhone 8

UITabBar不显示在iOS 7中选定的项目图像

这些图标在ios 6中显示正常,但在ios 7中显示不了。我在viewController的viewDidLoad方法中设置了选中的状态。 当用户select一个标签栏项目图像消失。 这是我的代码: UITabBar *tabBar = self.tabBarController.tabBar; if ([UITabBar instancesRespondToSelector:@selector(setSelectedImageTintColor:)]) { [self.tabBarController.tabBar setSelectedImageTintColor:[UIColor whiteColor]]; } UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; UITabBarItem *item1 = [tabBar.items objectAtIndex:1]; UITabBarItem *item2 = [tabBar.items objectAtIndex:2]; UITabBarItem *item3 = [tabBar.items objectAtIndex:3]; [item0 setTitle:@"Home"]; [item1 setTitle:@"Calendar"]; [item2 setTitle:@"News"]; [item3 setTitle:@"My Events"]; [item0 setFinishedSelectedImage:[UIImage imageNamed:@"homeIconSelected.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"home2.png"]]; [item1 setFinishedSelectedImage:[UIImage imageNamed:@"Calendar"] withFinishedUnselectedImage:[UIImage […]

如何更改标签栏上不活动的图标/文字颜色?

如何在iOS 7标签栏上更改不活动的图标/文字颜色? 灰色的那个。

移动UITabBarItem图像?

通常在UITabBar每个选项卡上,都有一个小图像和一个标题来命名选项卡。 图像位于标签顶部的中心位置,以容纳下方的标题。 我的问题是: 如果你想有一个只有一个图像,没有标题的tabBar是否有办法将图像向下移动,以便它在标签中更好? 我正在使用(见下文)目前: [tabBarItem setFinishedSelectedImage:tabSelected withFinishedUnselectedImage:tabUnselected]; 但宁愿使用更大的图像没有标题,现在,如果我使图像大于70像素@ 2x它开始削弱UITabBar的顶部,同时留下很多未使用的空间在底部。