Assuming you don't actually want to PRESS the button programmatically, but simply copy the outcome of pressing the button, you should tell the navigation controller to pop the current view controller.
is the best option but if you are nor on the same view controller class or your delegate changes before your back button method called then you can also try--