Use Swift 5.7 if-let style

This commit is contained in:
Arkadiusz Fal
2022-09-28 16:27:01 +02:00
parent 8f96a7c5e0
commit a086a0f440
50 changed files with 114 additions and 114 deletions

View File

@@ -31,7 +31,7 @@ final class ScrollViewMatcherViewController: UIViewController {
private var scrollView: UIScrollView? {
didSet {
if oldValue != scrollView,
let scrollView = scrollView
let scrollView
{
onMatch(scrollView)
}
@@ -70,7 +70,7 @@ final class ScrollViewMatcherViewController: UIViewController {
}
func matchUsingGeometry() {
if let parent = parent {
if let parent {
if let scrollViewsInHierarchy: [UIScrollView] = parent.view.viewsInHierarchy() {
// Return first match if only a single scroll view is found in the hierarchy.
if scrollViewsInHierarchy.count == 1,