ios - How to call some code if users press back button -


in uinavigationcontroller?

for example, want make sure uinavigationcontroller not animating when user press button.

if aren't intending intercept button tap instead act of current view controller disappearing, can use:

- (void)viewwilldisappear:(bool)animated {     if (self.ismovingfromparentviewcontroller) {         // handle button press     } } 

if sure want button, can create own custom uibarbuttonitem , set current controller's leftbarbuttonitem. sure call [self.navigationcontroller popviewcontrolleranimated:yes] after have finished doing own logic.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -