Skip to content

Commit

Permalink
Replacing flatMap With compactMap
Browse files Browse the repository at this point in the history
flatMap is mark as deprecated in Swift 4.1 and replaced by compactMap
  • Loading branch information
onmotion authored Apr 16, 2018
1 parent e36c912 commit 9697251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/InnerAlertController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class InnerAlertController: UIAlertController {

private func searchLabel(from text: String) -> UILabel? {
return view.recursiveSubviews
.flatMap { $0 as? UILabel}
.compactMap { $0 as? UILabel}
.first { $0.text == text }
}

Expand Down

0 comments on commit 9697251

Please sign in to comment.