简体   繁体   中英

Get resourses of default tab bar icons in iOS 7

How can I get the resourses of default tab bar icons in iOS 7 ?

Such that, I want to use an existing Apple image (icon) with my own title in a TabBarItem

hello you can try it this way,

-(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];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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