このビューの色を変更したい。白ではなく、アプリの色と同じボタンビューの色をタブバーに追加します。どのようにそれが可能です。
1 に答える
1
このためには、カスタマイズする必要がありますmoreNavigationController
。1 つの解決策は、メソッドをサブクラス化UITabBarController
し、次のメソッドを追加する- (void)viewDidLoad
ことです。
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UINavigationController *moreController = self.moreNavigationController;
//if u want to custamize navigationBar u can customize
//moreController.navigationBar
if ([moreController.topViewController.view isKindOfClass:[UITableView class]]) {
//Custamize your tableview here
UITableView *tableView = (UITableView *)moreController.topViewController.view;
//Change the color of tableView
[tableView setBackgroundColor:[UIColor redColor]];
moreController.topViewController.view = tableView;
}
}
これがお役に立てば幸いです
カスタマイズするには、tabBarItem
他の回答に従うことができます。
于 2012-11-07T09:18:00.677 に答える