I have multiple text fields on the screen, and when I click "Done" in the navigation bar, I want to get the values in the text fields as well as go back to the previous screen.
This is what I have so far that allows the user to go back to the previous screen:
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneDoctorButton:)];
self.navigationItem.rightBarButtonItem = doneButton;
I wanted to try making two different methods:
getting the textfield values when the user presses down
popping the view when the user presses up
I've seen something similar for normal UIButtons, but for some reason cannot figure out how to do it for a UIBarButtonItem. Is this a feasible way to do this? If so, I'm not sure how to implement those two different methods for the same bar button.
Thanks!