uitabbar

how to have a overlay on top of a select UITabBar item?

元气小坏坏 提交于 2020-01-06 20:02:10
问题 anybody know how to have an additional overlay on top of the selected item ? the background are done in app delegate. UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navbar_bgrd.png"]]; if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) { //iOS 5 [self.tabBarController.tabBar insertSubview:imageView atIndex:1]; } else { //iOS 4.whatever and below [self.tabBarController.tabBar insertSubview:imageView atIndex:0]; } Selected not Selected 回答1: Fixed

How to add UITabBarController programatically without using AppDelegate?

别等时光非礼了梦想. 提交于 2020-01-06 12:42:55
问题 I want to put a UITabBar in two views, but not in the MainViewController, because I am not using the AppDelegate to put it. Is there a solution without .xib or storyboard 回答1: UIViewController *vc1 = [[UIViewController alloc] init]; vc1.title = @"FIRST"; vc1.view.backgroundColor = [UIColor blueColor]; UIViewController *vc2 = [[UIViewController alloc] init]; vc2.title = @"SECOND"; vc2.view.backgroundColor = [UIColor redColor]; UITabBarController *tabBar = [[UITabBarController alloc] init];

how to resize iphone tab bar in xcode?

你离开我真会死。 提交于 2020-01-06 11:02:07
问题 I'm developing an iOS app that has 5 items in the tab bar. But they are not evenly distributed. I want the right-most one to be larger and obviously it takes more spaces. and other 4 tab items can evenly distribute. I've done some research but cannot find a good solution. Where can i customize the tab bars? thanks 回答1: You can't do this with the standard iOS tab bar. You need to create a custom one or use one of the numerous open source libraries that do it already. 回答2: You can use

UITabbar orientation problem

风流意气都作罢 提交于 2020-01-06 08:40:35
问题 I am working on orientation work on uitabbar application. I am using 5 tabbar item in tabbar. I want only 4 tab bar item to be rotated in both Landscape and potrait. but the issue is when i put "return no" to shouldAutorotateToInterfaceOrientation in non rotating tabbar item, all tab bar are not working. can anybody please tell me what i went wrong? Thanks in advance. Regards, sathish 回答1: By default, a UITabBarController will only return YES to the shouldAutorotateToInterfaceOrientation:

Objective-C: Tabbaritem tapped->Method Called-> But WebView not refreshed

走远了吗. 提交于 2020-01-06 05:22:26
问题 Trying to achieve When I tap on the tabbaritem say #2, it will called the method and reload the web view. Issue When I tap on the tabbaritem, the method is called but web view did not reload. Did not load the web view Question If I called the method on the VC itself. I can manage to reload the web view. Only if I called it when the tabbaritem is tapped, it doesn't reload the web view. Code MyTabBarController.m - (void)tabBarController:(UITabBarController *)tabBarController

Tabbar Nav app, allowing one view to rotate while others do not

独自空忆成欢 提交于 2020-01-05 14:30:40
问题 I have a tab bar application in which i have 3 diffrent views each with there own view controller. In the tab bar code i have this, to handle rotation. #import "RotatingTabBarController.h" @implementation RotatingTabBarController // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return [self.selectedViewController shouldAutorotateToInterfaceOrientation

Tabbar Nav app, allowing one view to rotate while others do not

懵懂的女人 提交于 2020-01-05 14:29:52
问题 I have a tab bar application in which i have 3 diffrent views each with there own view controller. In the tab bar code i have this, to handle rotation. #import "RotatingTabBarController.h" @implementation RotatingTabBarController // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return [self.selectedViewController shouldAutorotateToInterfaceOrientation

Tabbar Nav app, allowing one view to rotate while others do not

可紊 提交于 2020-01-05 14:29:41
问题 I have a tab bar application in which i have 3 diffrent views each with there own view controller. In the tab bar code i have this, to handle rotation. #import "RotatingTabBarController.h" @implementation RotatingTabBarController // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return [self.selectedViewController shouldAutorotateToInterfaceOrientation

UITabBar can't change selected index

独自空忆成欢 提交于 2020-01-05 07:22:08
问题 I'm having trouble changing the index of my UITabBar. I am attempting to change it from the UITabBarController subclass. This is what I'm trying: [self.tabBarController setSelectedIndex:1]; This is what my .h looks like #import <UIKit/UIKit.h> @interface CustomTab : UITabBarController <UITabBarControllerDelegate>{ IBOutlet CustomTab *bar; } @end I am trying to set the index with an IBAction, the method is being called, but the index doesn't change. Any ideas? 回答1: Because you are calling

Custom UITabBarController Problems with View Controllers and Views

不羁的心 提交于 2020-01-05 02:32:27
问题 I'm writing a custom UITabBarController so I can fully control appearance of the tab bar. I've got it all working so I have an array of view controllers that it handles. The controller has a main view which fills the screen, and inside it it has a UIView at the bottom for the tab bar. That tab bar view has a button for each view controller. When buttons are pressed I add the view controller's view to the main view, and set it's frame so that it doesn't cover the tab bar view: controller.view