Merge pull request #1918 from flowinho/ios-release

Fix Typo
This commit is contained in:
Maurice Parker 2020-03-15 16:45:53 -05:00 committed by GitHub
commit c08b6d1ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,13 +17,13 @@ extension UITableView {
selectRow(at: indexPath, animated: animations.contains(.select), scrollPosition: .none)
if let visibleIndexPaths = indexPathsForRows(in: safeAreaLayoutGuide.layoutFrame) {
if !(visibleIndexPaths.contains(indexPath) && cellCompletelyVisable(indexPath)) {
if !(visibleIndexPaths.contains(indexPath) && cellCompletelyVisible(indexPath)) {
scrollToRow(at: indexPath, at: .middle, animated: animations.contains(.scroll))
}
}
}
func cellCompletelyVisable(_ indexPath: IndexPath) -> Bool {
func cellCompletelyVisible(_ indexPath: IndexPath) -> Bool {
let rect = rectForRow(at: indexPath)
return safeAreaLayoutGuide.layoutFrame.contains(rect)
}