繁体   English   中英

获取iOS 7中默认选项卡栏图标的资源

[英]Get resourses of default tab bar icons in iOS 7

如何获得iOS 7中默认选项卡栏图标的资源?

这样,我想在TabBarItem中使用带有我自己的标题的现有Apple图像(图标)

你好,你可以这样尝试

-(void)loadTabBarView
{
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.navViewController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
self.navViewController.navigationBar.barStyle=UIBarStyleBlack;
self.navViewController.navigationBar.hidden=TRUE;
self.navViewController.tabBarItem.title = @"Home";
[self.navViewController.tabBarItem initWithTabBarSystemItem:UITabBarSystemItemContacts tag:1];

self.vcMenuViewController = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil];
self.navMenuViewController = [[UINavigationController alloc] initWithRootViewController:self.vcMenuViewController];
self.navMenuViewController.navigationBar.barStyle=UIBarStyleBlack;
self.navMenuViewController.navigationBar.hidden=TRUE;
self.navMenuViewController.tabBarItem.title = @"Menu";
[self.navMenuViewController.tabBarItem initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:2];

NSArray *arrayWithController = [NSArray arrayWithObjects:self.navViewController,self.navMenuViewController,nil];// self.navNewsTab, nil];

self.tabBar=[[UITabBarController alloc]init];
self.tabBar.moreNavigationController.navigationBar.barStyle = UIBarStyleBlack;
[self.tabBar setViewControllers:arrayWithController];
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM