I have two screens. From first screen to next screen I was connect push
segue in storyboard. Now in my second screen one alert will show with ok button. after pressing ok button i need to go to my first screen
Here is my code:
- (void)signup:(NSDictionary *)params {
if (error)
{
[PCUtilities showAlertWithTitle:@"Oops" message:error.localizedDescription cancelButtonTitle:@"ok"];
}
}
Inside one method I have UIAlert
.
This below code I tried but not working!!
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
if([title isEqualToString:@"ok"])
{
[self.navigationController pushViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"AppMainNavController"] animated:YES];
}
}
AppMainNavController
= is my navigation controller story board id