簡體   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