我想使用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;
}
所以请帮帮我。
谢谢!
答案 0 :(得分:1)
self.navigationController.navigationBar.translucent=YES;
self.navigationBarTintColor = RGBCOLOR(111,63,35);
self.statusBarStyle = UIStatusBarStyleBlackOpaque;
_toolbar.tintColor = RGBCOLOR(111,63,35);
答案 1 :(得分:0)
将navigationBarTintColor代码添加到viewWillAppear而不是init。