Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using on a storyboard tableview with iOS7 behavior #5

Open
jerometonnelier opened this issue Jul 25, 2014 · 1 comment
Open

Using on a storyboard tableview with iOS7 behavior #5

jerometonnelier opened this issue Jul 25, 2014 · 1 comment

Comments

@jerometonnelier
Copy link

Hi ;-)

I'm having the hardest time to make this component work with a tableView (loaded from a storyboard as a UIViewController that contains a UiTableView).
The VC uses autolayout, it uses "adjust scrollview insets" and "under top bars" edge insets.

If I remove the under top bars, it works like a charm. But if I do, the component is never showed on screen and I have a scrollView content inset visible since there a white space where the component should be.

Here is the code I use and below a screenshot with and without "under top bars" checked.

UIView* container = [UIView new];
container.frame = CGRectMake(0, 0, 320, 45);
container.backgroundColor = WINDOW_TINT_COLOR;
self.statusButton = [UIButton buttonWithType:UIButtonTypeCustom];
self.statusButton.frame = container.bounds;
[self.statusButton setTintColor:WINDOW_TINT_COLOR];
[self.statusButton setTitle:@"statut" forState:UIControlStateNormal];
[self.statusButton addTarget:self action:@selector(showStatusViewController) forControlEvents:UIControlEventTouchUpInside];
[container addSubview:self.statusButton];
[self.tableView setFloatingHeaderView:container];

capture decran 2014-07-25 a 09 36 06
capture decran 2014-07-25 a 09 36 21

Thanks for your help ;)

@paulius005
Copy link

If you make the uinavigationbar opaque instead of translucent, it works as designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants