Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UISearchBarとの付き合い方

Sho Ikeda
November 21, 2017

 UISearchBarとの付き合い方

関西モバイルアプリ研究会 in 関東での発表資料です #関モバ

https://kanmoba.connpass.com/event/70685/

Sho Ikeda

November 21, 2017
Tweet

More Decks by Sho Ikeda

Other Decks in Programming

Transcript

  1. UISearchBar • tableView.tableHeaderView = serachBar • navigationItem.titleView = searchBar •

    navigationItem.serachController = searchController • ” NEW in iOS 11!
  2. !

  3. !

  4. !

  5. Change searchBar's backGroundColor • swift - UISearchController iOS 11 Customization

    - Stack Overflow if let textField = searchBar.value(forKey: "searchField") as? UITextField { textField.textColor = UIColor.blue if let backgroundView = textField.subviews.first { // Background color backgroundView.backgroundColor = UIColor.white // Rounded corner backgroundview.layer.cornerRadius = 10; backgroundview.clipsToBounds = true; } }
  6. !

  7. !