Skip to content

Commit a07de07

Browse files
authored
Merge pull request hyperoslo#267 from davidevincenzi/master
Move configureLayout(_) in viewDidLayoutSubviews()
2 parents 7b1b937 + fbd246d commit a07de07

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Source/LightboxController.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,6 @@ open class LightboxController: UIViewController {
185185
goTo(initialPage, animated: false)
186186
}
187187

188-
open override func viewDidAppear(_ animated: Bool) {
189-
super.viewDidAppear(animated)
190-
if !presented {
191-
presented = true
192-
configureLayout(view.bounds.size)
193-
}
194-
}
195-
196188
open override func viewDidLayoutSubviews() {
197189
super.viewDidLayoutSubviews()
198190

@@ -213,6 +205,11 @@ open class LightboxController: UIViewController {
213205
width: view.bounds.width,
214206
height: 100
215207
)
208+
209+
if !presented {
210+
presented = true
211+
configureLayout(view.bounds.size)
212+
}
216213
}
217214

218215
open override var prefersStatusBarHidden: Bool {

0 commit comments

Comments
 (0)