Skip to content

Commit

Permalink
swift4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ArLupin committed Sep 10, 2018
1 parent 979c666 commit 639b05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Example/TabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TabBarController: UITabBarController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

viewControllers?.flatMap{ ($0 as? UINavigationController)?.visibleViewController }.forEach {
viewControllers?.compactMap{ ($0 as? UINavigationController)?.visibleViewController }.forEach {
let searchBar = UISearchBar(frame: .zero)
if #available(iOS 11.0, *) {
searchBar.heightAnchor.constraint(equalToConstant: 44).isActive = true
Expand Down

0 comments on commit 639b05f

Please sign in to comment.