uitabbar

Rounded corners for UITabBar

吃可爱长大的小学妹 提交于 2019-12-06 10:42:57
问题 I would like to create a UITabBar with rounded corners. Is there a way I can make the UITabBar have rounded corners? It would take the shape of the second picture. The app starts off with a tableView. When the user taps a topic, they are sent to a tabBar controller. -----edit----- This is my AppDelegate: func application(_application: UIApplication, willFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool{ let tabBarController = window?.rootViewController as!

Issues with UIMoreNavigationController and UITabBarController

感情迁移 提交于 2019-12-06 09:56:00
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 user is logged on or not, and who they're logged into. I have this working like so: On app launch

sharing NSManagedObjectContext and other service classes between iphone/ipad tabs

放肆的年华 提交于 2019-12-06 07:57:51
I am well into building a Core Data tab-based iPad application. I am passing in my NSManagedObjectContext to my root view using the following in my app delegate class. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.rootViewController.managedObjectContext = self.managedObjectContext; [window addSubview:tabBarController.view]; [window makeKeyAndVisible]; return YES; } My question is: how do I set the same managedObjectContext on all my tabs? It would also be good if I could set up some of my service classes in the app delegate

How to change the color of unselected tab bar items in iOS 7?

本秂侑毒 提交于 2019-12-06 07:54:35
Im trying to change the color of the unselected images in the tab bar, by default they are changed to gray, even if the image is another color. I already search this, but the answers are only for iOS 6 or below. This drove me mad just recently so I wrote my own class to handle it that works with every version of iOS I've tried it on ;) Its really easy to extend to do whatever you want it to do too! GozTabBar.h: #import <UIKit/UIKit.h> #import "GozTabBarItem.h" @protocol GozTabBarDelegate; @interface GozTabBar : UIView { UITapGestureRecognizer* pTapGestureRecognizer; } @property UIColor*

Approach to make a custom tabBar

ⅰ亾dé卋堺 提交于 2019-12-06 07:27:38
问题 What should be the best way to create a effect like this and the handling of navigation controllers and view controllers ... what to do if I don't want to re-size each subsequent view in viewcontorller and things appear as if it is a tabBar 回答1: I would recommend using an UIImageView for the blue background, then 5 UIButtons of custom type with PNG images for the actual buttons. Subclass UIView and put all the code to set up the background and buttons in the init function. That way you can

UITabbar with partially transparent background

无人久伴 提交于 2019-12-06 06:04:46
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 have tried which did not work) //[[UITabBar appearance] setBackgroundColor:[UIColor clearColor]]; //

Custom UITabBar unselected item's color

可紊 提交于 2019-12-06 05:54:29
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)!], forState: UIControlState.Normal) you can use .AlwaysOriginal tabBarItem.selectedImage = UIImage(named:

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

半腔热情 提交于 2019-12-06 05:53:29
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 PushViewController / PopViewController methods it sometimes fails. For example if I navigate fast back and forth

iOS 10: Custom UITabBar background image produces border at top of image. How do I remove it?

廉价感情. 提交于 2019-12-06 01:26:27
问题 Anyone have a working solution to get rid of this border in iOS 10? I have a custom UITabBar background image. I've tried the following with no results: tabBar.backgroundImage = UIImage(named: "myBackgroundImage.png") tabBar.shadowImage = nil tabBar.shadowImage = UIImage() // i've also tried combinations of this in the storyboard directly I finally threw my hands up in the air and set the bar style to "Black".. this doesn't get rid of the border, but makes it white. So it hides it. 回答1: If

Hide TabBar in iOS 6

末鹿安然 提交于 2019-12-06 00:45:58
I want to Hide my TabBar in iOS 6 , when i wrote the code which is given below it works in iOS 7 but it shows black line in iOS 6 self.tabBarController.tabBar.hidden = YES; Here is snapshot for iOS 6 : Try with below code May be this will help you... - (void)hideTabBar:(UITabBarController *) tabbarcontroller { for(UIView *view in tabbarcontroller.view.subviews) { if([view isKindOfClass:[UITabBar class]]) { if([UIScreen mainScreen].bounds.size.height==568) { [view setFrame:CGRectMake(view.frame.origin.x, 568 +20, view.frame.size.width, view.frame.size.height)]; } else { [view setFrame