Skip to content

Commit 5d5f14a

Browse files
authored
fix a build error on Xcode 11.4 (#337)
1 parent bed519f commit 5d5f14a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Examples/Maps/Maps/ViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ class SearchHeaderView: UIView {
274274

275275
extension UISearchBar {
276276
func setSearchText(fontSize: CGFloat) {
277-
#if swift(>=5.1) // Xcode 11 or later
277+
if #available(iOS 13, *) {
278278
let font = searchTextField.font
279279
searchTextField.font = font?.withSize(fontSize)
280-
#else
280+
} else {
281281
let textField = value(forKey: "_searchField") as! UITextField
282282
textField.font = textField.font?.withSize(fontSize)
283-
#endif
283+
}
284284
}
285285
}

0 commit comments

Comments
 (0)