I am currently trying to perform a iOS trash-style custom segue which involves the popping and pushing of view controllers of the same class (the destination view controller is instantiated via the storyboard.) I would like to disable one of the toolbar UIBarButtonItems during a segue in order to prevent the user from accidentally clicking on it as the trash animation is being performed. however, it seems that simply calling self.deleteButton.enabled = NO; doesn't work. If I take out the segue line, the button is disabled.
0
votes
2 Answers
0
votes
0
votes
I eventually came up with a solution. Since I was performing a custom segue with a custom animation, I began by disabling the bar button on the destination view controller as soon as it has been pushed into the navigation controller. In the completion block of my custom animation, I simply reenable the button again. Hope this helps.
prepareForSegue:
? – Suhas