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

时间:2010-05-17 10:10:04

标签: iphone thumbnails three20

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

如何更改?

1 个答案:

答案 0 :(得分: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;
    }