Skip to content

Commit 28acb5a

Browse files
committed
Layout HeaderView
1 parent 5c6fa43 commit 28acb5a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Source/LightboxController.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ open class LightboxController: UIViewController {
198198
width: view.bounds.width,
199199
height: 100
200200
)
201+
202+
headerView.frame = CGRect(
203+
x: 0,
204+
y: 16,
205+
width: view.bounds.width,
206+
height: 100
207+
)
201208
}
202209

203210
open override var prefersStatusBarHidden: Bool {
@@ -281,13 +288,6 @@ open class LightboxController: UIViewController {
281288
}
282289
}
283290

284-
let bounds = scrollView.bounds
285-
let headerViewHeight = headerView.closeButton.frame.height > headerView.deleteButton.frame.height
286-
? headerView.closeButton.frame.height
287-
: headerView.deleteButton.frame.height
288-
289-
headerView.frame = CGRect(x: 0, y: 16, width: bounds.width, height: headerViewHeight)
290-
291291
[headerView, footerView].forEach { ($0 as AnyObject).configureLayout() }
292292

293293
overlayView.frame = scrollView.frame

0 commit comments

Comments
 (0)