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).
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 inviewDidAppear
... By configuring the layout insideviewDidLayoutSubviews()
, when the view appears, it is configured with the final frame but before presentation, which makes the UI correct when it is presenting (beforeviewDidAppear
is called).