Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

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

@chanil1218

Description

@chanil1218

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions