Tag: uitabbarcontroller

TabBar图像应该是多大?

我有一个大小为100的tabBar的图标。 我检查了苹果的人机界面指南 ,它说图像大小应该是30×30 / 60×60 。 但是,因为标签栏控制器的高度是50,我保持图像的大小在50×50 。 现在,当我运行这个项目的时候,我看到了下面那个丑陋的devise: 任何想法,我应该使用什么大小的图像,使devise将是完美的? 注意:我也不是写文本(例如,主页,search等)。 标签button的文本在图像本身。

如何在TabBar中设置图像不在tos颜色?

我有一个UITabbar的应用程序,我想在Tabbar中设置图像,但无法在Tabbar中设置图像。 而不是因为它是图像我得到的图像形状的色调,是否有可能设置图像,因为它是在Tabbar? 。 我试过这个代码,但无法设置图像。 UITabBar *tabBar = self.tabBar; UITabBarItem *targetTabBarItem = [[tabbar items] objectAtIndex:0]; // whichever tab-item UIImage *selectedIcon = [UIImage imageNamed:@"name-of-selected-image.png"]; [targetTabBarItem setSelectedImage:selectedIcon];

如何在Swift编程中获得基于导航的模板function

我需要一个导航控制器通过我的项目,我的应用程序最初有一个社交login。 一旦validation身份validation用户将推到另一个视图,在那里我显示一个tabbarcontroller有2个选项卡。 我不知道如何在Swift编程中做到这一点。 我已经在导航控制器中embedded我的viewcontroller,从这里一旦authentication成功,我如何推送用户到tabbar视图? Tabbar也应该有导航。

如何在iOS 5中更改UITabBarItem中的文本颜色

在iOS 5中有更多的外观控制,我们如何更改UITabBarItem文本颜色? 从默认白色到其他颜色? 编辑:工作解决scheme [[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:UIControlStateNormal];

iOS自定义选项卡栏

我刚刚开始iOS开发,只是在atm玩游戏。 我试图将默认的标签栏button变成更自定义的东西。 经过一番四处张望,我发现你可以为每个button创build自定义状态,所以我做了: UIImage *selectedImage0 = [UIImage imageNamed:@"first.png"]; UIImage *unselectedImage0 = [UIImage imageNamed:@"second.png"]; UITabBar *tabBar = self.tabBarController.tabBar; UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; [item0 setFinishedSelectedImage:selectedImage0 withFinishedUnselectedImage:unselectedImage0]; 但是,我不能摆脱默认button,它会更改图像,但它不会更改我的整个button。 还有什么我需要做的吗? UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; self.tabBarController = [[UITabBarController alloc] init]; self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil]; self.window.rootViewController = self.tabBarController; […]

在Swift中改变VC问题。 如何在标签栏控制器中的视图之间传递数据?

我有四个ViewController,我不使用UITabbedbar,因为这是更难以定制。 我使用模态赛格,但我认为内存消耗是过度的。 这是我的第一个和第二个VC的屏幕截图。 我必须使用正确的更改视图? 这是我使用的代码: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { if (segue.identifier == "second") { let secondVC = segue.destinationViewController as SecondViewController; } }

如何正确使用导航控制器来实现标签栏控制器

我正在使用Storyboard和Xcode 6.我的Storyboard中有下一个控制器和场景: 具有HomeViewController作为根的UINavigationController 。 HomeViewController有一个button, Show (eg Push) UITabBarController 。 UITabBarController有4个UIViewControllers 。 但是我的问题是,在显示UITabBarController后,在4个UIViewControllers中没有导航栏。 但我认为,如果我Show (eg Push) UITabBarController那么它应该embedded导航控制器,在故事板中的初始控制器。 我对吗? 如果是这样,我怎么能安装导航栏在故事板,因为现在有默认的酒吧事件在推介标签栏,我在故事板上看到。 我已经select了UIViewController,并在身份检查器中设置模拟度量为Top属性的半透明导航栏,但我认为它应该自动添加到此控制器和标签栏,而无需额外的步骤。 或者我应该添加新的导航控制器的每个标签栏项目将有他们的根视图控制器? 主要问题,为什么我看不到导航栏使用显示(例如推)故事板。 例如,如果我添加导航控制器,然后设置为根标签栏控制器,然后Xcode自动添加顶部导航栏,但如果队列有一个额外的步骤像在我的情况HomeViewController顶部导航栏永远不会自动出现。

如何隐藏uitabbarcontroller

我有一个UITabBarController的问题。 在我的应用程序中,我想隐藏它,但不使用hidesBottomBarWhenPushed因为我想隐藏它,而不是当我推它。 例如,当我在应用程序中按隐藏button时,我想隐藏它。 我在谷歌阅读了很多文章,但我无法find如何做到这一点。