Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TTThumbsViewController + navigationController issue

I am only using Three20 for a gallery in my app.

When I push my .. : TTThumbsViewController from another view, the navigation bar is not the color I want it to be (as per the rest of my app). I have set up a TTDefaultStyleSheet as per this stackoverflow QA. Is there something special I have to do as I am only using the TTThumbsViewController?

The thumbs view is also created with extra space at the top, as though it is leaving room for a navigation controller, without knowing that one is already there. How can I tell the TTThumbsViewController to use the existing uinavigationcontroller? Or behave as though it is?

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

The problem depicted graphically:

alt text http://www.imgplace.com/img594/1309/39testapp.png

Thanks!

like image 676
michael Avatar asked Apr 10 '10 16:04

michael


2 Answers

If you do not want to use a transparent navigation bar, this issue can be corrected by implementing the following method:

- (void) updateTableLayout {

self.tableView.contentInset = UIEdgeInsetsMake(5, 0, 0, 0);
self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(TTBarsHeight(), 0, 0, 0);}
like image 176
Ryan Sorensen Avatar answered Nov 10 '22 23:11

Ryan Sorensen


I found the solution.

In my ThumbsViewController I have this:

- (void)viewWillAppear:(BOOL)animated {

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

    navController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

    [self setWantsFullScreenLayout:YES];
}

The thumbs are now in the correct position.

like image 42
Misa Avatar answered Nov 10 '22 21:11

Misa