Hardeep Singh
Hardeep Singh

Reputation: 942

Back ground color of tab bar More button view

Can we change background color of this view?

I want change color of this view. I want tabbar more button view color same as app color,not white. how it is possible.

Upvotes: 1

Views: 575

Answers (1)

Shineeth Hamza
Shineeth Hamza

Reputation: 1277

Fo this you have to customize moreNavigationController. One solution is to subclass your UITabBarController and add following on - (void)viewDidLoad method.

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

I hope this helps you

to customize the tabBarItem you can follow other answers.

Upvotes: 1

Related Questions