Tag: uitabbar

UITabBarItem上的自定义背景未在第二次敲击时设置

我有一个自定义的标签栏与自定义的标签栏项目。 一切工作,因为我想要的,除了当一个水龙头已点击,并处于选定的状态,它不会使用我自定义突出显示的背景,如果重新点击。 到目前为止,我设定: UIButton *tap = [UIButton buttonWithType:UIButtonTypeCustom]; [tap setBackgroundImage:img forState:UIControlStateNormal]; [tap setBackgroundImage:[UIImage imageNamed:@"img_down"] forState:UIControlStateHighlighted]; [tap setBackgroundImage:[UIImage imageNamed:@"img_down"] forState:UIControlStateSelected]; 我读过,我可能需要使用UITabBarDelegate。 有任何想法吗?

iOS – uitabbarcontroller之前的login视图

我想在login成功时显示接口UITabBar 。 我在AppDelegate声明了接口UITabBar ,但是在login成功之后,我不知道如何调用接口。 这是我的代码: appdelegate.m -(void)loadInterface { [self configureiPhoneTabBar]; } -(void)configureiPhoneTabBar { UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController; UIViewController *controller1 = [[tabBarController viewControllers] objectAtIndex:0]; [self configureTabBarItemWithImageName:@"home_ON.png" : @"home.png" andText:@"Trang chủ" forViewController:controller1]; UIViewController *controller2 = [[tabBarController viewControllers] objectAtIndex:1]; [self configureTabBarItemWithImageName:@"channel_ON.png" : @"tvChannel.png" andText:@"Kênh" forViewController:controller2]; } 和loginviewcontroller.m – (IBAction)btnLogin:(id)sender { [self performSegueWithIdentifier:@"idenLogin" sender:self]; AppDelegate *delegate = (AppDelegate […]

UITabBar在顶部或其他?

我是新来的swift,将创build一个用户界面,其中显示一个tabor,当我通过苹果的人机界面的指导方针 ,他们说,不使用UITabBar顶部。 我们可以通过自定义来使用它,但是很多人在App Store中提交时会被拒绝。 所以,而不是UITabar应该使用顶部的标签?

删除TabBarItem突出显示

我有一个基于UITabBar的应用程序,在一个TabBarbutton我有一个导航控制器。 当我移动到导航控制器,标签栏高亮选项需要被删除。 不应该select标签栏button。 我怎么能做到这一点?

为什么我的UITabBar在纵向加载时向下移动20个像素?

我正在UINavigationController加载UITabBarController 。 默认情况下, UITabBar的UITabBarController将它放在视图的底部。 通过使用默认选项,在横向启动应用程序时,该栏将在底部正确显示。 这也使肖像正确显示在底部,(但只有当横向模式启动应用程序)。 如果我以纵向方式启动应用程序,则会在两个横向上向下移动状态栏的高度: 和肖像: 我正在尝试与CNBC应用程序产生类似的效果,并在视图顶部显示UITabBar 。 在回顾了Mihai Damian的问题之后,我试图自定义UITabBar。 我只是简单地添加了几行代码: -(void)loadView{ UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; contentView.backgroundColor = [UIColor clearColor]; self.view = contentView; [contentView release]; orderingTabBarController = [[UITabBarController alloc] init]; OrderingSpecialsViewController *specialsViewController = [[OrderingSpecialsViewController alloc] initWithNibName:@"OrderingSpecialsViewController" bundle:nil]; OrderingProductViewTabBarController *productViewTabBarController = [[OrderingProductViewTabBarController alloc] init]; OrderingSummaryViewController *summaryViewController = [[OrderingSummaryViewController alloc] init]; […]

UITabBarController中的“默认”视图

我有一个UITabBarController 5 NavigationControllers,作为标签(类似于下面的图片1)embedded。 所以,问题是:当TabBarController显示时,我想将表视图(或任何其他视图)显示为“默认”视图。 即,显示视图(视图控制器),这是没有embedded到TabBarController中,并使任何选项卡select。 我很抱歉这样的解释,更好的观看下面的图片#2。 我在我的项目中使用最新版本的XCode和Swift。 而对于界面,我正在使用故事板

如何将UITabBar项目从UITabBar(而不是UITabBarController)连接到IB中的不同视图?

我创build了一个StoryBoard项目,并添加了一个UITabBar到我的第一个视图和一些UITabBar项目上。 我使用UITabBar而不是UITabBarController因为UITabBar需要垂直滚动,所以它在UIScrollView 。 我想将UITabBar项目连接到不同的ViewControllers 。 如何在界面构build器中执行此操作? 与UITabBarController它只是一个Ctrl +拖动像在IB一切,但由于某种原因, UITabBar行为不同。 我知道我需要实现的所有委托方法,但现在我只关心如何将UITabBar项连接到视图。

从Storyboard更改选项卡栏图标/文本色调颜色

我已经阅读了大约10个不同的post,他们都build议在代码中使用你的应用代理。 是否有可能从故事板内改变它?

UIMoreNavigationController和UITabBarController的问题

这个问题一直困扰着我,但是我想我终于明白了什么是错的。 我想我现在只需要一个解决scheme… 这是应用程序的背景。 用户可以使用大约6个不同的选项卡,使用UITabBarController进行显示。 这些选项卡中的每一个都是UINavigationController中的自定义UIViewController子类。 所有6个选项卡都设置在一个nib文件(MainWindows.xib)中。 我需要能够隐藏和显示不同的标签,取决于用户是否login,以及他们login谁。 我有这样的工作: 在应用程序启动(应用程序:didFinishLaunching:…),六个选项卡被存储到我有一个NSMutableArray。 这工作正常… 当用户login或注销时,我从NSMutableArray访问他可以使用的选项卡,并将它们添加到UITabBarController中,如下所示: [tabBar setViewControllers: [NSArray arrayWithObjects: [viewControllers objectAtIndex:1], [viewControllers objectAtIndex:5], nil] animated:YES]; viewControllers是我之前用6个选项卡做的NSMutableArray。 在我创buildNSLog之后做这个,这就是我所期望的: 2012-02-24 11:45:57.690 [redacted][26155:207] ( "<UINavigationController: 0x8249db0>", "<UINavigationController: 0x841a3f0>", "<UINavigationController: 0x824be40>", "<UINavigationController: 0x824dbd0>", "<UINavigationController: 0x824e810>", "<UINavigationController: 0x841dfb0>" ) 但是,当我从最后一个自定义视图控制器,这是在列表中的最后一个导航控制器中打印self.parentViewController的值,我得到这个: 2012-02-24 11:54:51.247 [REDACTED][26306:207] <UIMoreNavigationController: 0x826ab00> 2012-02-24 11:54:51.248 [REDACTED][26306:207] <UITabBarController: 0x8257c50> 第一行是self.parentViewController,第二行是self.parentViewController.parentViewController 这似乎表明,heirachy是: UITabBarController – […]

带有滑出菜单的标签栏

RearViewController.m -(IBAction)unwindFromViewController:(UIStoryboardSegue *)segue { if ([segue.identifier isEqualToString:@"unwindToViewController"]) { ViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"]; [self presentViewController:detail animated:YES completion:nil]; } } 如果我从我的RearViewController点击回来, ViewController不会呈现,而只是窥视和熄灭(再次显示RearViewcontroller )。 镜像2