uitabbar

Show UITabBar when UIViewController pushed

 ̄綄美尐妖づ 提交于 2019-11-30 00:50:53
Here's my situation : I have a UINavigationController inside a UITabBarController . When I drill down the navigation controller, at some point I have to hide the UITabBar because I want the view to have as much space as possible. I do that by using self.hidesBottomBarWhenPushed = YES inside the pushed UIViewController , and it works quite well. However, I want to show the UITabBar back in the following pushed controllers. I've tried to put self.hidesBottomBarWhenPushed = NO in the other controllers, but the UITabBar won't come back. It seems to be normal as the documentation states :

What's the height of a UITabBar on iOS 8, iOS 9, iOS 10, and iOS 11?

旧城冷巷雨未停 提交于 2019-11-29 22:05:05
The height of the UITabBar seems to have changed between iOS 7 and 8/9/10/11. I'm posting this question for others to easily find the answer. So: What's the height of a UITabBar on iOS 8/9/10/11 on iPhone and iPad? For iOS 8, 9, and 10 the height is 49 points , both on iPad and iPhone and both in portrait and landscape. It used to be 56 points on iOS 7. For iOS 11, things get a bit more complicated: In portrait and regular landscape , the height is still 49 points . In compact landscape , the height is now 32 points . On iPhone X, the height is 83 points in portrait and 53 points in landscape.

Deselect or unselect all tabs in tabbar in iOS 5

我们两清 提交于 2019-11-29 21:03:15
问题 I am new to iOS development and I have started with IOS 5 directly. I have created a storyboard which consists of a tabview controller as its rootviewcontroller. I have put 2 tabs to it. I want to deselect/unselect all the tabs initially. How do I do this? I have tried the following UIView *view = [[UIView alloc]initWithNibName:@"view" bundle:[NSBundle mainBundle]]; [self.tabBarController setSelectedViewController:nil]; [self.tabBarController setSelectedViewController:view]; where I have

How to change UITabBarController More button's title?

老子叫甜甜 提交于 2019-11-29 20:26:35
问题 I have a Tab Bar app. The app has 8 UITabBarItems and the More button is added automatically. I want to change the title from More to something else. I have already tried the following: tabbarController.moreNavigationController.tabBarItem.title=@"Test"; But it still displays "More". No error. No changes. How can I change the "More" text to another? 回答1: The label under the "More" button is localized for you based on the user's current Locale as specified in their Settings. However, you have

Setting the default tab when using storyboards

情到浓时终转凉″ 提交于 2019-11-29 19:58:40
Can anyone please tell me how to set the default tab when using storyboards in iOS. I can't seem to figure out how to accomplish this. Thank you You can use one of these two methods: tabBar.items = tabBarItems; tabBar.selectedItem = [tabBarItems objectAtIndex:0]; or a direct method from the object [tabBar setSelectedItem:myUITabBarItem]; or you can combine them to do this: tabBar.items = tabBarItems; [tabBar setSelectedItem:[tabBarItems objectAtIndex:0]]; but i havent tested that method yet, hope this helps! Whilst you can set the initial selected tab programmatically like the other answers,

How to properly customize UITabBar and UITabBarItem on iOS 7 and iOS 8?

偶尔善良 提交于 2019-11-29 17:22:58
问题 I am googling around so much, but nowhere I find a straight and consolidated answer. I want to customize my UITabBarController such that: the UITabBar itself is completely black the text color of the item titles is white in non-highlighted state the text color of the item titles is red in highlighted state Use multicolored icons in the tab bar 1. Turn UITabBar black I am guessing I need to use the UIAppearance API for this, and actually I was able to turn the UITbarBar black using: [[UITabBar

How can I have a popover come from a tab instead of a view

半腔热情 提交于 2019-11-29 16:34:35
I have a tabbar app, and I want a popover to come from one of the tabs. Is there a good/easy way to do this without changing views? There isn't currently a way to directly (through a supported api call) get the frame of a specific tab bar item. What I do is just show the popup from the left end of the tab bar like this: CGFloat tabBarHeight = self.tabBarController.tabBar.bounds.size.height; CGRect rect = CGRectMake(0, 0, tabBarHeight, tabBarHeight); [popoverController presentPopoverFromRect:rect inView:self.tabBarController.tabBar permittedArrowDirections:UIPopoverArrowDirectionDown animated

Need 6 tabs in tab bar [duplicate]

为君一笑 提交于 2019-11-29 15:59:03
This question already has an answer here: How to Identify tab bar items? 3 answers I am implementing a tab bar based application and i need 6 tabs in the tab bar,but the tab bar is displaying only 4 tabs and in Fifth tab it is displaying More with 5th tab and 6th tab in table view. Can i have 6 tabs in tab bar without More tab? Maximum is 5 Tabs in a tabbar. This is because when there was more than 5 tab, they would be too small and for people with thicker fingers it would be difficult to hit the wanted tab. If you really want, you can write your own tabbar-controller that allows 6 or even

UItabBar changing View Controllers

时光总嘲笑我的痴心妄想 提交于 2019-11-29 13:55:23
i have some difficulties changing tab bar controllers. Basically I have UITabBarController with 3 controllers. First time when app starts. I change one controller like this: NSMutableArray *muteArray = [[NSMutableArray alloc] init]; FirstPage *online; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { online =[[FirstPage alloc] initWithNibName:nil bundle:nil]; }else{ online =[[FirstPage alloc] initWithNibName:nil bundle:nil]; } //adding all controllers of tab bar to array [muteArray addObjectsFromArray:_navigationCotroller.viewControllers]; online.tabBarControllers = [muteArray copy];

UITabBar selectionIndicatorImage height on iPhone X

旧城冷巷雨未停 提交于 2019-11-29 13:50:18
问题 I'm using a selectionIndicatorImage for a UITabBar , which is 49 points high, like this: UITabBar.appearance().selectionIndicatorImage = UIImage(named: "bg-tab-selected") Works just fine across all devices: Except for the iPhone X: I've tried setting the images to be vertically sliced only in the asset catalog, but that doesn't seem to have the desired effect. For some reason it also stretches horizontally? And there is a bit of padding on top. Any ideas how I can fix this? 回答1: I had the