6

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!

Community
  • 1
  • 1
michael
  • 124
  • 8

2 Answers2

9

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);}
Ryan Sorensen
  • 645
  • 7
  • 7
  • This solution, not Misa's (sorry Misa), totally worked for me. Thanks...randomly generated username :) – Abel Oct 16 '10 at 15:35
  • Was having the same problem, and I found that I needed both suggestions to get it to work. Thanks to everyone! :) – nstehr Mar 14 '11 at 23:15
3

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.

sth
  • 222,467
  • 53
  • 283
  • 367
Misa
  • 46
  • 1
  • > I want to change the bar style ,if i gave any other style other than UIBarStyleBlackTranslucent then i get the above problem.Thanks. – Warrior May 17 '10 at 10:03