I have an two controllers 1st is self and 2nd is maincontroller, where I\'m pushing maincontroller in stack
controllers
self
maincontroller
create a button and give the button action as follows.
[self alert];
and when the alert is displayed, after tapping over yes
[self.navigationController popViewController];
after this,
self.navigationController.LeftBarButton = myButton;
this may help