LoginSignup
0
0

More than 5 years have passed since last update.

one button on NavigationBar

Last updated at Posted at 2018-05-07
// image 24x24

 func setupNaviBarButtons() {
    let searchImage = UIImage(named: "search_icon")?.withRenderingMode(.alwaysOriginal)
    let searchBarButtonItem = UIBarButtonItem(image: searchImage, style: .plain, target: self, action: #selector(handleSearch))

    let moreButton = UIBarButtonItem(image: UIImage(named: "more_icon")?.withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(handleMore))

    navigationItem.rightBarButtonItem = searchBarButtonItem
//    navigationItem.rightBarButtonItems = [UIBarButtonItem(), searchBarButtonItem]
  }
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0