once writing alert and calling whereever we want in vc

UIAlertView * alert_registration;

please this where alert required:
[self alertStatus:@"Please Accept Terms and Conditions" :@"Alert" :nil :@"OK"];

#pragma mark - alert view delegate mathods
- (void) alertStatus:(NSString *)msg :(NSString *)title :(NSString *)cancelButton :(NSString *)otherButton
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title
message:msg
delegate:self
cancelButtonTitle:cancelButton
otherButtonTitles:otherButton, nil];

[alertView show];

}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(alertView == alert_registration)
{
if(buttonIndex == 0)
{
[self performSegueWithIdentifier:@"segue_RegisterSuccess" sender:self];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];

}
}
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
Previous
Next Post »