如何在iphone中的Three20 Thumbs viewcontroller中更改导航栏样式?

问题描述 投票:1回答:1

我使用Three20来创建缩略图视图。我想将导航栏样式从黑色半透明更改为黑色。如果我给blacktranslucent它工作正常,如果我改变它拇指指甲视图降低像这image

我该怎么改变它?

iphone thumbnails three20
1个回答
2
投票

您可以覆盖init方法,并在那里更改您想要的任何内容。例如 :

// MyThumbsController inherits from TTThumbsViewController
@implementation MyThumbsController

...


    - (void) setCustomNavigationBar
    {
        // Navigation bar logo
        UIImage *barLogo = [UIImage imageNamed:@"bar-logo.png"];
        UIImageView *barLogoView = [[UIImageView alloc] initWithImage:barLogo];

        self.navigationItem.titleView = barLogoView;

        // Navigation bar color
        self.navigationBarTintColor = HEXCOLOR(0xb22929);

    }   

    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
        if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {

            // Customization
            self.hidesBottomBarWhenPushed = NO;
            [self setCustomNavigationBar];

        }

        return self;
    }
© www.soinside.com 2019 - 2024. All rights reserved.