1

我想使用 Three20 更改 TTPhotoviewcontroller 中的导航颜色。我已更改 TTPhotoviewcontroller 中的颜色,但该视图中未设置图像。如果我更改了颜色,导航栏会占据一些位置,并且图像不会设置为完整视图。

在 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;
        }

所以请帮帮我。

谢谢!

4

2 回答 2

1
self.navigationController.navigationBar.translucent=YES;

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

self.statusBarStyle = UIStatusBarStyleBlackOpaque;

_toolbar.tintColor = RGBCOLOR(111,63,35);
于 2011-10-10T21:31:04.653 回答
0

将您的 navigationBarTintColor 代码添加到 viewWillAppear 而不是 init。

于 2011-08-16T17:52:36.917 回答