2010-05-17 47 views
1

我使用Three20创建缩略图视图。我想将导航栏的风格从黑色半透明变成黑色。如果我给黑色透明,它可以正常工作,如果我更改它,缩略图视图像这样降低image。如何更改它?请帮助我。谢谢。如何更改iphone中Three20 TTThumbsviewcontroller的导航栏风格?

+0

对此有何帮助?我有同样的问题。 – Chris 2010-07-25 17:39:13

+0

@Chris对不起,直到日期的正面结果 – Warrior 2010-07-28 15:48:44

+0

我实际上找到了一个解决方案:http://stackoverflow.com/questions/3286190/changing-three20-navigationbartintcolor-causes-gap-at-top-of-image-gallery- thumbv – Chris 2010-08-03 01:32:25

回答

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; 
    } 
相关问题