views:

207

answers:

1

I have implemented a Three20 Image Gallery into my App. I want to change the color of the Navigation Bar at the top of the Image Gallery Screen. I have gone into TTThumbsViewController.m and found the lines that read:

self.statusBarStyle = UIStatusBarStyleDefault;
self.navigationBarStyle = UIBarStyleDefault;

If I change these values, the color / style of the Navigation Bar changes, but a gap appears between the Navigation Bar and the first row of images. The gap looks to have a height larger than than the Navigation Bar but shorter than the first row of thumbnails.

I have implemented a Three20 Stylesheet but that has not resolved the issue.

+1  A: 

In my App, in the file where I am using TTThumbsViewController, I added this method to the .m file and it fixed the gap issue:

- (void) updateTableLayout {
self.tableView.contentInset = UIEdgeInsetsMake(5, 0, 0, 0);
self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(TTBarsHeight(), 0, 0, 0);
}

I am now able to change the navbar color to whatever I wish and the navbar / table spacing is correct.

Chris
Hi Chris, I almost jumped out of my seat when I saw your solution as I have the same problem. Unfortunately your solution isnt working. Any ideas? I have tried calling this method on viewDidAppear and it made no difference.
qui
I didn't need to call this method or do anything other than simply add the method to my .m file. I added it to the .m file that I created in my App, not the .m file that is contained in the Three20 Framework itself. I don't have the code with me at the moment, so I am working off memory. I will check tonight, but I don't think I did anything else to get this working. There could be a difference between how you implement TTThumbsViewController and that might be the difference? Here is a link to the tutorial I originally used (this does not include the gap-fix) http://bit.ly/bbAANX
Chris