How to change navigation bar color in TTPhotoviewcontroller using Three20 in iPhone

988 views Asked by At

I want to change the navigation color in the TTPhotoviewcontroller using Three20.I have changed the color in the TTPhotoviewcontroller, but the image is doesn't set in that view. If i changed the color, the navigation bar occupies some place and image is not set to the full view.

In TTPhotoViewController.m,

      - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
            if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
               self.statusBarStyle = UIStatusBarStyleBlackTranslucent;
               self.navigationBarStyle = UIBarStyleBlackTranslucent;
               self.navigationBarTintColor = nil;
             ( if i use this below code, image is doesn't set to the full view in TTPhotviewcontroller )
               // self.navigationBarTintColor = [UIColor colorWithRed:34/256.0 green:125/256.0 blue:144/256.0 alpha:1.0];   
              // self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:34/256.0 green:125/256.0 blue:144/256.0 alpha:1.0];
                  self.wantsFullScreenLayout = YES;
                  self.hidesBottomBarWhenPushed = YES
                  return self;
        }

So please help me out.

Thanks!

2

There are 2 answers

0
Piersoft On
self.navigationController.navigationBar.translucent=YES;

self.navigationBarTintColor = RGBCOLOR(111,63,35);

self.statusBarStyle = UIStatusBarStyleBlackOpaque;

_toolbar.tintColor = RGBCOLOR(111,63,35);
0
Matt Hudson On

Add your navigationBarTintColor code to viewWillAppear instead of init.