only scroll down once

pull/1/head
Michael Kirk 7 years ago
parent 1a43498c2e
commit 69e8b187ad

@ -98,6 +98,7 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
updateLayout() updateLayout()
} }
var hasEverAppeared: Bool = false
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
@ -113,7 +114,10 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
photoMediaSize.thumbnailSize = CGSize(width: cellSize.width * scale, height: cellSize.height * scale) photoMediaSize.thumbnailSize = CGSize(width: cellSize.width * scale, height: cellSize.height * scale)
reloadDataAndRestoreSelection() reloadDataAndRestoreSelection()
scrollToBottom(animated: false) if !hasEverAppeared {
hasEverAppeared = true
scrollToBottom(animated: false)
}
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {

Loading…
Cancel
Save