forked from shadowfacts/Tusker
Update SheetController
Fixes image picker losing velocity during dismiss animation
This commit is contained in:
parent
1a8e84f5fa
commit
a814ee37cc
|
@ -6,7 +6,7 @@
|
||||||
"repositoryURL": "https://git.shadowfacts.net/shadowfacts/SheetController.git",
|
"repositoryURL": "https://git.shadowfacts.net/shadowfacts/SheetController.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "6ee1ad24ec8620f5c17416d6141643f0787708ba",
|
"revision": "6926446c4e15eb7f4513c4c00df9279553b330be",
|
||||||
"version": null
|
"version": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,13 +40,6 @@ class AssetPickerSheetContainerViewController: SheetContainerViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AssetPickerSheetContainerViewController: SheetContainerViewControllerDelegate {
|
extension AssetPickerSheetContainerViewController: SheetContainerViewControllerDelegate {
|
||||||
func sheetContainer(_ sheetContainer: SheetContainerViewController, willSnapToDetent detent: Detent) -> Bool {
|
|
||||||
if detent == .bottom {
|
|
||||||
dismiss(animated: true)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
func sheetContainerContentScrollView(_ sheetContainer: SheetContainerViewController) -> UIScrollView? {
|
func sheetContainerContentScrollView(_ sheetContainer: SheetContainerViewController) -> UIScrollView? {
|
||||||
if let vc = assetPicker.visibleViewController as? UITableViewController {
|
if let vc = assetPicker.visibleViewController as? UITableViewController {
|
||||||
return vc.tableView
|
return vc.tableView
|
||||||
|
|
Loading…
Reference in New Issue