Why Does Changing Navigation Bar Tint Color Introduce Gap

35 views
Skip to first unread message

Casey

unread,
Feb 24, 2012, 1:50:32 AM2/24/12
to Three20
I'm extending the TTThumbsViewController class for my own photo
gallery and when I change the navigation tint color back to my
application color, a huge gap of space (40px?) is introduced at the
top of the of the photo gallery. As soon as I take out my code to
change the tint color, the photo gallery lines up perfectly below the
navigation bar. Could someone please tell me why this happens?

I've tried changing tint color using:

self.navigationBarTintColor = [UIColor colorWithHexString:
@"#224272"];
self.navigationController.navigationBar.tintColor = [UIColor
colorWithHexString: @"#224272"];

Both have the same result.

Tobias Klonk

unread,
Feb 24, 2012, 4:12:21 AM2/24/12
to thr...@googlegroups.com
The Problem is, that TTThumbsViewController expects a translucent NavigationBar and accounts for that by moving the table 44px to the bottom. You can workaround by adding this to your subclass:

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

Could you please open an issue at https://github.com/facebook/three20/issues

Tono

--
To learn more about Three20, check out http://three20.info

You received this message because you are subscribed to the Google
Groups "Three20" group.
To post to this group, send email to thr...@googlegroups.com
To unsubscribe from this group, send email to
three20+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/three20?hl=en

Casey

unread,
Feb 24, 2012, 7:05:19 PM2/24/12
to Three20
Thanks. That worked perfectly. I've opened the bug:
https://github.com/facebook/three20/issues/780

On Feb 24, 2:12 am, Tobias Klonk <m...@tonklon.com> wrote:
> The Problem is, that TTThumbsViewController expects a translucent NavigationBar and accounts for that by moving the table 44px to the bottom. You can workaround by adding this to your subclass:
>
> - (void)updateTableLayout {
>   self.tableView.contentInset = UIEdgeInsetsMake(4, 0, 0, 0);
>   self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, 0);
>
> }
>
> Could you please open an issue athttps://github.com/facebook/three20/issues
>
> Tono
>
> Am 24.02.2012 um 07:50 schrieb Casey:
>
>
>
>
>
>
>
> > I'm extending the TTThumbsViewController class for my own photo
> > gallery and when I change the navigation tint color back to my
> > application color, a huge gap of space (40px?) is introduced at the
> > top of the of the photo gallery. As soon as I take out my code to
> > change the tint color, the photo gallery lines up perfectly below the
> > navigation bar. Could someone please tell me why this happens?
>
> > I've tried changing tint color using:
>
> > self.navigationBarTintColor = [UIColor colorWithHexString:
> > @"#224272"];
> > self.navigationController.navigationBar.tintColor = [UIColor
> > colorWithHexString: @"#224272"];
>
> > Both have the same result.
>
> > --
> > To learn more about Three20, check outhttp://three20.info
Reply all
Reply to author
Forward
0 new messages