Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 26, 2021 07:00
Show Gist options
  • Select an option

  • Save iosdevie/b365f9a3f772b6d9b54026d07831cdd2 to your computer and use it in GitHub Desktop.

Select an option

Save iosdevie/b365f9a3f772b6d9b54026d07831cdd2 to your computer and use it in GitHub Desktop.
func setNavigationBar() {
if let navItem = navigationBar.topItem{
let detectItem = UIBarButtonItem(title: "Detect", style: .done, target: self, action: #selector(detectImage))
let clearItem = UIBarButtonItem(title: "Clear", style: .plain, target: self, action: #selector(clear))
navItem.rightBarButtonItems = [clearItem,detectItem]
navItem.leftBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: self, action: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment