开发者

How to change the navigation bar style in Three20 TTThumbsviewcontroller in iphone?

I am using Three20 to create a thumbnail view. I want to change the navigation bar style to black from black translucent. If I give blacktranslucent it works fine, if I change it the开发者_开发技巧 thumb nail view is lowered like this image.

How can I change it?


You can override the init method, and change whatever you want there. For instance :

// 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;
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜