views:

30

answers:

0

I encountered a strange problem when trying to go back to the previous view using an UIActionSheet. This is my code (stripped down to show the relevant part):

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

if (buttonIndex == 0) {
    /*
    Doing some stuff here
    */

    [self.navigationController popViewControllerAnimated:YES];
}

}

In the same view, there is a custom back button which makes use of popViewController successfully. I also tried to delay popping the viewController and the function is being called, but won't do what I ask for either.

Is there anything I'm overlooking? I actually feel stupid right now.