Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
- if (editing && [viewController isEqual:tabBarController.viewControllers[0]]) {
- //confirm
- confirmExit = [[UIActionSheet alloc] initWithTitle:@"You have unsaved changes, are you sure you want to continue?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"YES" otherButtonTitles:nil, nil];
- [confirmExit showFromTabBar:self.tabBarController.tabBar];
- return NO;
- } else {
- return YES;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment