Merge branch 'ios-release'
This commit is contained in:
commit
147d5c301c
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue