Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- navigationItem.hidesBackButton = YES
- let backButton = UIBarButtonItem(title: ">", style: .Plain, target: self, action: #selector(backTapped))
- navigationItem.rightBarButtonItem = backButton
- I use this way for change back button position.
- //put this code in viewDidLoad()
- navigationItem.hidesBackButton = true
- navigationItem.rightBarButtonItem = UIBarButtonItem(title: " > ", style: .done,target: self, action: #selector(addTapped))
- //function to handle back navigation
- @objc func addTapped(){
- navigationController?.popToRootViewController(animated: true)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement