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

viewFrame moved when Extend Edges - Under Top Bars enabled #21

Open
chanil1218 opened this issue Jul 29, 2014 · 0 comments
Open

viewFrame moved when Extend Edges - Under Top Bars enabled #21

chanil1218 opened this issue Jul 29, 2014 · 0 comments

Comments

@chanil1218
Copy link

When Extend Edges enabled(possibly because translucent nav bar), top layout guide which example views(button, and textfield added in sample project) constrained to is moved up along with setStatusBarHidden:YES called.

This cause all content view(should not move by viewFrame setting) moved. In this case, viewFrame not changed, only constraints reference(top layout guide) of each view changes.

And if UIScrollView added to view(and also Extend Edges enabled), it's contentOffset and contentInset automatically modified so that the scrollView seems moving up along with status bar moving up.
Setting scrolling subview's contentInset and contentOffset unchanged before and after status bar hidden, it resolves scrollView moving up. (But some issues remaining like "how to set every scroll views' inset and offset unchanged and make it back when Status Bar returns" and "scroll view scrolling stops during some moments with inset and offset changes")

There need robust control in condition of Extend Edges case.
I didn't use auto layout, but someone use auto layout.
And I think Mailbox use similar technique to show notifier view. They dismiss notifier view only when scrolling in scroll view stops to avoid issue that I mention.

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

1 participant