uitabbar

How to add “more” button to Tab Bar?

不想你离开。 提交于 2019-12-09 01:45:52
问题 My iPhone app has a tab bar controller at the bottom of the view - and at the moment I have three buttons on it. However, I want to add more, but to do so I need to turn the last of the three buttons into a "More..." button, because otherwise the text on the other buttons runs into each other. I know that if you have over 5 buttons in the tab bar, then it automatically creates a more button - but is there a way to manually invoke this with the editing capabilities? Thanks. 回答1: You do not

tabBar didSelectItem seems not to be working

房东的猫 提交于 2019-12-08 18:46:33
问题 In my header file I have this: @interface TabBarController : UIViewController <UIApplicationDelegate, UITabBarDelegate, UITabBarControllerDelegate>{ IBOutlet UITabBarController *tabBarController; } -(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item; @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; @end In my main file I have this: @synthesize tabBarController; -(void)viewDidLoad{ [super viewDidLoad]; self.tabBarController.delegate = self; self.view

How to change background color for tab in tvOS 13?

瘦欲@ 提交于 2019-12-08 13:41:38
TvOS 13. I have a UITabBarController with tabs. And can customize almost everything except this obvious thing: focused tab's background. It's always white. Guide tells Specify tints for selected and unselected items I tried: view.backgroundColor = .purple tabBar.tintColor = .yellow tabBar.barTintColor = .red tabBar.unselectedItemTintColor = .brown tabBar.backgroundColor = .green tabBar.backgroundImage = UIColor.blue.toImage() tabBar.shadowImage = UIColor.orange.toImage() tabBar.selectionIndicatorImage = UIColor.burgundy.toImage() Nothing helped. After playing a bit with various properties of

Tell UITabBar which view to load

▼魔方 西西 提交于 2019-12-08 13:32:48
问题 Is there a way to load views according to some states when touchingon UITabBar button? For example I touch "Home" button View1 loads. Than i do some code and when i touch "Home" button again View2 loads. 回答1: It can be done ...Suppose we have two view in memory myView1 & myView2 .. - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { if(OnPressHomeTabBarButton) // Put your condition at this place { [myView1 removeFromSuperview]; [self.view addSubview:myView2]; } else {

Custom IOS UITabbarController with hidden top gray line

人盡茶涼 提交于 2019-12-08 10:05:36
问题 I'd like to make a view with a unique color with uitabbar i.e I don't want to separate the view into the UITabbar and the rest, so I've created a custom UITabbar programmatically with custom color. The UITabbar and the "rest of the view" have the same color but there is a gray line on top of the UITabbar that separates the to parts. How can I hide that? this is an example image, I want to delete that dark line: https://picasaweb.google.com/felixdl/20Giugno2012#5756005463317234882 SOLUTION

Custom UITabBar unselected item's color

ぐ巨炮叔叔 提交于 2019-12-08 02:58:34
问题 I am trying to change the default grey colour of the unselected UITabBarItems. I have managed to change the text but not the image. TabBar.appearance().barTintColor = UIColor(red: 86.0/255.0, green: 132.0/255.0, blue: 208.0/255.0, alpha: 1.0) var normalTint: UIColor = UIColor.whiteColor() TabBar.appearance().tintColor = UIColor.whiteColor() UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: normalTint,NSFontAttributeName: UIFont(name: "Arial", size: 13)!],

Issues with UIMoreNavigationController and UITabBarController

纵然是瞬间 提交于 2019-12-08 02:20:22
问题 This problem has been plaguing me for a little while, but I've think I've finally figured out what's wrong; I think I just need a solution now... Here's the background on the app. There are about 6 different tabs which the user can use, displayed using a UITabBarController. Each of these tabs is a custom UIViewController subclass, inside a UINavigationController. All 6 tabs are set up inside a nib file (MainWindows.xib). I need to be able to hide and show different tabs depending on if the

UITabbar with partially transparent background

陌路散爱 提交于 2019-12-07 23:42:25
问题 Long time reader, first time poster. Please be gentle :P I'm working on an app and have a background image for a UITabbar element that is transparent for a few pixels at the top. I have searched far and wide, tried many solutions suggested that I could find (setting tint, background color to clearColor, setting alpha to 0.2, etc) but I continue to see a black line where the tabbar should be transparent. I am setting the background as follows (see the lines commented out for some more things I

How to force UITabBar compact design when in landscape on iPhone X?

久未见 提交于 2019-12-07 21:37:38
问题 So, I'm having a problem with the UITabBar on iPhone X. The problem is that the tab bar doesn't adjust the icons when it is in landscape mode, like the UITabBarController. 1 - I've set the safe area settings. 2 - I've put the tab bar inside a UI view. But this only fixes the tab bar misplacement on iPhone X. My problem is better described in the image below: When running on iPhone 8 (anyone but iPhone X) the tab bar works like expected. But when running (the same view, with no changes) on

Tab bar item icons appear darker

扶醉桌前 提交于 2019-12-07 19:47:59
问题 When setting the icons for the tab bar items it seems that the icons are appearing darker for some reason. Examples below Tab bar in app What it should be like from designs As you can see in the second example the colours are softer and lighter compared to the ones above i can't seem to figure out why because even in my image.xcassets the icons look like the ones in the design and in my setting in the identity inspector shown below there doesn't seem to be any settings for tints. Storyboard