6

我只在我的应用程序中使用 Three20 作为画廊。

当我.. : TTThumbsViewController从另一个视图推送时,导航栏不是我想要的颜色(根据我的应用程序的其余部分)。TTDefaultStyleSheet我已经按照这个 stackoverflow QA设置了一个。因为我只使用 TTThumbsViewController,所以我需要做一些特别的事情吗?

拇指视图也在顶部创建了额外的空间,就好像它为导航控制器留出了空间,但不知道导航控制器已经存在。我怎样才能告诉TTThumbsViewController使用现有的uinavigationcontroller?或者表现得好像它是一样的?

MYThumbsViewController *mYThumbsViewController = [MYThumbsViewController alloc];
[self.navigationController pushViewController:mYThumbsViewController animated:YES];

以图形方式描述的问题:

替代文字 http://www.imgplace.com/img594/1309/39testapp.png

谢谢!

4

2 回答 2

9

如果您不想使用透明导航栏,可以通过执行以下方法来纠正此问题:

- (void) updateTableLayout {

self.tableView.contentInset = UIEdgeInsetsMake(5, 0, 0, 0);
self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(TTBarsHeight(), 0, 0, 0);}
于 2010-06-05T00:51:07.643 回答
3

我找到了解决方案。

在我的ThumbsViewController我有这个:

- (void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];
    UINavigationController* navController = self.navigationController;

    navController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

    [self setWantsFullScreenLayout:YES];
}

拇指现在处于正确的位置。

于 2010-04-23T23:37:08.050 回答