uitabbar

Tab bar icons on retina display

独自空忆成欢 提交于 2019-12-03 12:58:53
I am making an iPhone App but I can't understand why my custom tab bar icons are pixelated. They are 30x30. If I change the resolution to 60x60, for example, the icons are still pixelated but they are also incomplete. Can you help me to fix this problem? Thank you very much. You don't need to double the size of your non-retina images. You need to create two separate icons icon.png (30x30) and icon@2x.png (60x60). iOS will automatically load the right file based on the screen scale. You can find more information about taking advantage of the retina display at this url: https://developer.apple

How to move title of UITabBarItem?

半城伤御伤魂 提交于 2019-12-03 10:56:05
Can somebody tell me please how can I move title of UITabBarItem for example 2px to top? Solution: UITabBarItem *item = [tabBar.items objectAtIndex:0]; item.titlePositionAdjustment = UIOffsetMake(0, -5.0); Ibrahim Update for Swift 3 Put this code inside UITabBarController : UITabBarItem.appearance().titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -5) Credit goes to Tim Brown Swift 4 Like me, if you are creating tab bar controller inside some other controller just after adding all controller you can loop through the tab bar items and change title and positioning and font for (index

UITabBar appearance setSelectionIndicatorImage does not work on first launch iOS7

一个人想着一个人 提交于 2019-12-03 10:26:42
I have a customised UITabBar and use the following code in the AppDelegate: - (void)tabBarController:(MainUITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [self customizeTabBar]; } - (void)customizeTabBar { NSLog(@"*******customizeTabBar*******"); UIImage *tabBackground = [[UIImage imageNamed:@"unselectedtab"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; // Set background for all UITabBars [[UITabBar appearance] setBackgroundImage:tabBackground]; // Set tint color for the images for all tabbars [[UITabBar appearance]

how to set iphone tab bar icon by custom images using story board

烈酒焚心 提交于 2019-12-03 10:23:52
I am newbie to iphone development,I need to put a custom image icon in the tab bar .But it showing only the default colour(Black&blue) .Help me to overcome from this bug friends...? add the Images in application, and See attached Image Use this code in viewDidLoad UIImage *selectedImage0 = [UIImage imageNamed:@"selected.png"]; UIImage *unselectedImage0 = [UIImage imageNamed:@"unselected.png"]; UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; [item0 setFinishedSelectedImage:selectedImage0 withFinishedUnselectedImage:unselectedImage0]; Use below code in AppDelegate (BOOL)application:

How to definitively set UITabBar background color and UITabBar tint color

这一生的挚爱 提交于 2019-12-03 10:07:56
I have been trying to set my UITabBar 's tint color and background color for quite some time now and nothing seems to work. So far I have tried: tabBarController?.tabBar.backgroundColor = UIColor.orangeColor() tabBarController?.tabBar.barTintColor = UIColor.whiteColor() as well as: UITabBar.appearance().tintColor = UIColor.orangeColor() Neither of these seemed to have any effect on my tab bar. I'd also like to mention that I have the VC embedded in a navigation controller for which the global tint color that I set works perfectly fine. Lion If you want to set tabbar's tint and barTint color

How to re-order segues in initial view's tabbar controller in xcode 4.5?

北城以北 提交于 2019-12-03 09:52:05
How do I reorder the initial view's tabbar controller elements without having to delete all the segues and re connect them manually in the desired order? Is there a way to change the order of these after they have been hooked up? I was able to do this by just dragging them around in xcode 4.4 but that option seems to be non available in xcode 4.5. Hopefully, this is possible from within the storyboard mode. But if it's only possible programmatically, that's ok too, just looking for any proper way to accomplish this without having to delete them all and re hook them up. For example, how would I

View on Top of UITabBar

筅森魡賤 提交于 2019-12-03 08:26:28
问题 Similar to what the Spotify or Apple Music app does when a song is playing, it places a custom view on top of the UITabBar: Solutions I've tried: UITabBarController in a ViewController with a max-sized Container View, and the custom view on top of the Container View49pt above the Bottom Layout Guide: Problem: Any content in ViewControllers embedded in the UITabBarController constrained to the bottom don't show because they're hidden behind the custom layout. I've tried overriding size

UISegmentedControl with badge number

空扰寡人 提交于 2019-12-03 08:22:19
Just like the tabbar, I want to show badge on UISegmentedControl . As I cant see any predefined methods for UISegmentedControl just like available for UITabBar . I thought about adding the badge as an image just on top of it, but maybe there is some better way. Dan Ray Here is a little third party library I've used to draw badges on various things. It's pretty nice. For example, changing the color of the badge to match my design was trivial. Once you bring this class into your project and include it into your view controller, you go: CustomBadge *customBadge1 = [CustomBadge

How to set the Navigation Bar Color of the Tab Bar Configure Menu

最后都变了- 提交于 2019-12-03 08:16:33
问题 removed dead ImageShack link As you can see the view I need to change is the provided view to customize the tabbar order. I want to change the color of the navigation bar (displaying "Konfigurieren" which means "Configure"), I already found out how to change the color of the "More"-Navigation Controller, but not this one. Can anybody help me with that? 回答1: Use int AppDelegate tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor blackColor]; 回答2: I think what you are

UITabBarItem with custom title color and images

最后都变了- 提交于 2019-12-03 07:54:54
I`m trying to customize my TabBar in xcode,ios, however I just found ppl saying that this is not customizable! also, i did find some sort of solutions, but none of them are working for me. Pretty much I want to change the UITabBarItem title(text) color, and also change the 2 images inside it, the normal one and the selected one! I tried to iterate inside my UITabBar subviews to see if I find something, but any success: for (UIView *view in [self.tabBarController tabBar].subviews) { NSLog(@"Class: %@",[view class]); } the output of this was: 2011-05-18 18:15:24.031 EventApp[52235:207] Class: