-
Notifications
You must be signed in to change notification settings - Fork 92
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
Use safe area guides for text label and shutter button #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great, thank you so much @gerriet !!
As a favor, since I don't have an iPhone X, could you post screenshots of what the new layout looks like on one? I'll take a peek on my own device (iPhone 7+) today.
@dokun1, happy that you like the small contribution. I have attached two screenshots in portrait and landscape but also the same images as photos from my iPad looking at my iPhone X (as the notch and edges are removed in screenshots). Hope this helps. I might to also have a look at the camera switch button that can be a little too close to the rounded corner. Screenshot portrait: |
@gerriet Before I merge, how would you feel about adding some logic to have the text area span the entire width if it gets moved down for the notch? It looks like it would fit... Let me know your thoughts! |
if #available(iOS 11, *) { | ||
minY = self.safeAreaLayoutGuide.layoutFrame.minY | ||
} | ||
minY += 5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right here, we could perhaps put a check to see how much minY
has changed, and update self.frame.size
based on this value. I would love to do this, but not having an iPhone X means I dont know what value to expect ¯_(ツ)_/¯
The label will be moved down 39 points. Although full width for the label would be nice on this slim and high device, I am not sure about it, because I think the camera switch button will have to be moved out of the corner slightly, which will put text and button very close to each other. Will try it out tomorrow. |
Moved a little layout logic to the proper place
LGTM - anything else to change before merging? |
I'd say "let's go" |
Thank you @gerriet for contributing 👍 |
To improve the layout especially on iPhoneX, the safe area guides are used for