Merge branch 'ios-release'

This commit is contained in:
Maurice Parker 2020-04-22 22:04:45 -05:00
commit 147d5c301c
2 changed files with 15 additions and 1 deletions

View File

@ -18,7 +18,14 @@ final class PoppableGestureRecognizerDelegate: NSObject, UIGestureRecognizerDele
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return navigationController?.viewControllers.count ?? 0 > 2
return true
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if otherGestureRecognizer is UIPanGestureRecognizer {
return true
}
return false
}
}

View File

@ -14,6 +14,13 @@ extension UITableView {
Selects a row and scrolls it to the middle if it is not visible
*/
public func selectRowAndScrollIfNotVisible(at indexPath: IndexPath, animations: Animations) {
guard let dataSource = dataSource,
let numberOfSections = dataSource.numberOfSections,
indexPath.section < numberOfSections(self),
indexPath.row < dataSource.tableView(self, numberOfRowsInSection: indexPath.section) else {
return
}
selectRow(at: indexPath, animated: animations.contains(.select), scrollPosition: .none)
if let visibleIndexPaths = indexPathsForRows(in: safeAreaLayoutGuide.layoutFrame) {