Don't extend PhotoCollection picker beneath navbar
This commit is contained in:
parent
2eb2c2856b
commit
6556a3173c
|
@ -401,9 +401,12 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
|
|||
addChildViewController(collectionPickerController)
|
||||
|
||||
view.addSubview(collectionPickerView)
|
||||
collectionPickerView.autoPinEdgesToSuperviewEdges()
|
||||
collectionPickerView.autoPinEdgesToSuperviewEdges(with: .zero, excludingEdge: .top)
|
||||
collectionPickerView.autoPinEdge(toSuperviewSafeArea: .top)
|
||||
collectionPickerView.layoutIfNeeded()
|
||||
collectionPickerView.frame = view.frame.offsetBy(dx: 0, dy: view.frame.height)
|
||||
|
||||
// Initially position offscreen, we'll animate it in.
|
||||
collectionPickerView.frame = collectionPickerView.frame.offsetBy(dx: 0, dy: collectionPickerView.frame.height)
|
||||
|
||||
UIView.animate(.promise, duration: 0.3, delay: 0, options: .curveEaseInOut) {
|
||||
collectionPickerView.superview?.layoutIfNeeded()
|
||||
|
|
Loading…
Reference in New Issue