Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions OpalImagePicker/Source/OpalImagePickerRootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,17 @@ open class OpalImagePickerRootViewController: UIViewController {
tabSegmentedControl.setTitle(title, forSegmentAt: 1)
}

var topLayout = topLayoutGuide

if #available(iOS 11.0, *) {
topLayout = view.safeAreaLayoutGuide.topAnchor as! UILayoutSupport
}

NSLayoutConstraint.activate([
toolbar.constraintEqualTo(with: topLayoutGuide, receiverAttribute: .top, otherAttribute: .bottom),
toolbar.constraintEqualTo(with: topLayout, receiverAttribute: .top, otherAttribute: .bottom),
toolbar.constraintEqualTo(with: view, attribute: .left),
toolbar.constraintEqualTo(with: view, attribute: .right)
])
])
}

private func fetchPhotos() {
Expand Down