Tag: uitabbar

UITabBar外观setSelectionIndicatorImage在第一次启动iOS7时不起作用

我有一个自定义的UITabBar,并在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] setSelectedImageTintColor:[UIColor whiteColor]]; // Set selectionIndicatorImage for all tabbars [[UITabBar appearance] setSelectionIndicatorImage:[UIImage […]

如何通过自定义图像设置iphone标签栏图标使用故事板

我是iPhone新手,我需要把一个自定义的图像图标放在标签栏。但它只显示默认的颜色(黑色和蓝色)。帮我克服这个错误的朋友…?

自定义UITabBar和ViewController之间的空间

我采取了一个普通的UITabBar ,并将其背景图像更改为一个具有较低高度的自定义的,所以我改变了frame的height 。 起初我得到的是标签栏下方的空白处。 所以我也改变了frame的origin 。 但是现在空格已经移到标签栏之上了,结果是: 这是在AppDelegate中声明标签栏的代码: self.tabContoller = [[UITabBarController alloc] init]; //customizing the tabbar UIImage * tabBackgroundImage = [UIImage imageNamed:@"tabBarBg.png"]; self.tabContoller.tabBar.backgroundColor = [UIColor colorWithRed:245.f/255.f green:245.f/255.f blue:245.f/255.f alpha:255.f/255.f]; self.tabContoller.tabBar.backgroundImage = tabBackgroundImage; //setting the tabbar height to the correct height of the image CGRect tabR = self.tabContoller.tabBar.frame; CGFloat diff = tabR.size.height – tabBackgroundImage.size.height; tabR.size.height = […]

从UIVIewController访问UITabBarController

我正在开发一个基于UITabbar和视图层次结构的应用程序,如下所示。 UITabBarController —-> UINavigationController —-> UIViewController 我需要从UIIVewController访问UITabBarController。 但是下面的属性总是返回nil。 self.tabBarController和self.navigationController.tabBarController 有没有一种方法来直接访问TabbarController从一个子ViewController而不使用AppDelegate? @implementation HomeViewController – (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization self.title = @"Home"; self.navigationItem.title = @"Home"; self.tabBarItem.image = [UIImage imageNamed:@"TabBarHome"]; UITabBarController *tab = self.tabBarController; UITabBarController *tab1 = self.navigationController.tabBarController; UITabBarController *tab2 = self.navigationController.presentingViewController; } return self; }

显示在标签栏后面的TableView

我正在更新我的应用程序使用iOS 7,我有一个表视图的问题。 我的标签栏是半透明的。 问题是当我滚动到我的表视图的底部,最后一个单元格的一部分仍然在标签栏后面。 我想在最后一个单元格和标签栏之间留出一点空间。 我可以通过使用一个不透明的标签栏来解决这个问题,但是我想保持它半透明。

当select项目时,如何更改UITabItem的背景颜色

当用户select一个标签栏项目时,我想要一个不同的背景颜色,而不是当它被选中。

移动到另一个视图时,标签栏控制器消失(iOS SDK,使用情节提要)

我正在构build一个使用故事板的iPhone应用程序,并且对标签栏控制器有问题。 在从标签栏控制器(view1)链接的视图之一,有一个button导致另一个视图(view2)。 在View2上,有一个返回到View1的button。 非常直接。 但是当我从view1到view2,标签栏消失,更糟糕的是,当我回到View1,标签栏仍然没有…我怎样才能解决这个问题? (我还没有在应用程序中放置任何代码,只有故事板和苹果提供的AppDelegate类(也是一个主要的文件,我想,但我不打算触摸)。 任何回复高度赞赏!

以编程方式添加选项卡栏控制器到当前应用程序stream程

我想添加一个标签栏控制器到我目前的应用程序stream程。 目前我有一个页面上有一个button点击打开一个新的视图控制器与Web视图的用户login和login后,我想带他到他的主页导航栏有他的名字和注销button在右侧。 主页还应该有一个带有3个不同选项卡的标签栏。 我能够从web视图加载主页视图,并获得导航栏。 但我无法添加tabBar并得到它的工作。 我很困惑到哪里添加代码添加TabBar。 我正在使用下面的代码来添加标签栏 – UITabBarController *tabBar = [[UITabBarController alloc] init]; HomeViewController *home = [[PPHomeViewController alloc] initWithUserName:[self.userInfo objectForKey:@"name"] Email:[self.userInfo objectForKey:@"email"] Phone:[self.userInfo objectForKey:@"phone_number"]]; home.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:1]; UINavigationController *homeNavController = [[UINavigationController alloc]initWithRootViewController:home]; RequestViewController *req = [[RequestMoneyViewController alloc]init]; req.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:2]; UINavigationController *reqNavController = [[UINavigationController alloc]initWithRootViewController:req]; UIViewController *thirdViewController = [[UIViewController alloc]init]; […]

如何修复iOS中的标签栏控制器的标签栏?

我在标签栏的底部添加了我自己的图像图标,但只显示灰色方块和标题。 我怎样才能解决这个问题?

在UITabBarController之前显示XIB?

我面临这个问题几个月,我不知道什么是最好的解决scheme来解决它。问题是,我需要在我的UITabBar显示之前加载一个XIB,更清楚地说,我有我的第一个看法这是用户login(没有标签应显示),当用户login时,应用程序validation信息,之后应该用UITabBarController加载视图,但每次我尝试做到这一点,而不是模态地呈现login视图,两显示视图,login视图和标签栏视图。