uitabbar

What size should TabBar images be?

两盒软妹~` 提交于 2019-12-17 08:10:12
问题 I have icons for a tabBar of size 100. I checked at Apple's Human Interface Guidelines and it says the image size should be 30x30 / 60x60 . But as the height of tab bar controller is 50, I kept the size of the image at 50x50 . Now, when I run the project, I see the ugly design below: Any idea what size images I should use so that the design will be perfect? Note: I am not writing text also (e.g. Home, Search, etc). The text of the tab button is there in the image itself. 回答1: 30x30 is points,

Hiding the tabbar and removing the space

旧城冷巷雨未停 提交于 2019-12-17 07:15:38
问题 Is there a way to hide tabbar and remove that space left (around 50px) ? I tried self.tabBarController?.tabBar.hidden = true self.extendedLayoutIncludesOpaqueBars = true No luck. I see blank space. 回答1: If you're still seeing a black stripe under your hidden tab bar, have you tried to select Extend Edges Under Opaque Bars here? Make also sure that Under Bottom Bars is still selected. Hope it helps! 回答2: Swift 3 : extension UITabBarController { func setTabBarVisible(visible:Bool, duration:

How to change the Color of text in UITabBarItem in iOS 5

这一生的挚爱 提交于 2019-12-17 07:13:04
问题 with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ? EDIT:working solution [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, nil] forState

How to change the Color of text in UITabBarItem in iOS 5

末鹿安然 提交于 2019-12-17 07:12:18
问题 with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ? EDIT:working solution [[UITabBarItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, nil] forState

Positioning UITabBar at the top

旧时模样 提交于 2019-12-17 06:41:17
问题 I'm a beginner in iOS development. My question is: is it possible to position UITabBar at the top and how? I can't position my UITabBar at the top of the view. 回答1: Is it possible? Sure, but it violates the human interface guidelines. Screenshots: Code: TabController.h: #import <UIKit/UIKit.h> @interface TabController : UITabBarController <UITabBarControllerDelegate> @end TabController.m: #import "TabController.h" @interface TabController () @end @implementation TabController - (void

How to change inactive icon/text color on tab bar?

情到浓时终转凉″ 提交于 2019-12-17 06:24:13
问题 How can I change inactive icon/text color on iOS 7 tab bar? The one in gray color. 回答1: In every first ViewController for each TabBar: - (void)viewDidLoad { [super viewDidLoad]; // changing the unselected image color, you should change the selected image // color if you want them to be different self.tabBarItem.selectedImage = [[UIImage imageNamed:@"yourImage_selectedImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; self.tabBarItem.image = [[UIImage imageNamed:@"yourImage

UITabBar items jumping on back navigation on iOS 12.1

纵饮孤独 提交于 2019-12-17 05:39:15
问题 I have an iOS app with UITabBarController on a master screen, navigating to a detail screen hiding the UITabBarController with setting hidesBottomBarWhenPushed = true . When going back to the master screen the UITabBarController does a strange "jump" as shown on this GIF: This happens only on iOS 12.1 , not on 12.0 or 11.x. Seems like an iOS 12.1 bug, because I noticed other apps like FB Messenger with this behavior, but I was wondering, is there some kind of workaround for it? 回答1: In your

Changing Tint / Background color of UITabBar

空扰寡人 提交于 2019-12-17 01:34:14
问题 The UINavigationBar and UISearchBar both have a tintColor property that allows you to change the tint color (surprising, I know) of both of those items. I want to do the same thing to the UITabBar in my application, but have found now way to change it from the default black color. Any ideas? 回答1: I have been able to make it work by subclassing a UITabBarController and using private classes: @interface UITabBarController (private) - (UITabBar *)tabBar; @end @implementation

How to hide Tab Bar on push in Xamarin.Forms?

[亡魂溺海] 提交于 2019-12-14 00:39:41
问题 I'm struggling for last few days with TabbedPage in Xamarin.Forms on iOS. I found some solutions like those: https://forums.xamarin.com/discussion/20901/hide-tab-bar-on-push However, none of them works well. I also tried to subclass TabbedRenderer and set TabBar height to 0. It works, but if I hide TabBar in NavigationPage.Pushed event handler, there's some delay and for example TableView has blank space on the bottom. If I try to override NavigationRenderer and hide/show Tab Bar in

How can I build a custom UITabBar?

只愿长相守 提交于 2019-12-13 09:36:43
问题 I want to build a custom UITabBar with a white background color, rounded corners, a smaller width, and a custom indicator (see picture). Can I subclass UITabBar/UITabBarController or do I have to create a new view manually? And how can I do that? Many thanks! 回答1: Ok... firstly you can open the storyboard and set a nice pink background color, then you can add a UIView. You can set a proportional height and width to the superview like a 0.9 to the width and a 0.12 to the height, then a center