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

Move configureLayout(_) in viewDidLayoutSubviews() #267

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

davidevincenzi
Copy link
Contributor

This PR fixes a little issue I got when using Lightbox with SwiftUI, when showed as a modal. What happened was that the layout is adjusted to make space for the text below the image only after the view appeared. Expected behavior since the configureLayout(_) was in viewDidAppear...
By configuring the layout inside viewDidLayoutSubviews(), when the view appears, it is configured with the final frame but before presentation, which makes the UI correct when it is presenting (before viewDidAppear is called).

@3lvis 3lvis merged commit a07de07 into hyperoslo:master Nov 18, 2020
@3lvis
Copy link
Collaborator

3lvis commented Nov 18, 2020

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants