I have a UIAlert
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"ok" message:@"Canc?" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Annul", nil]; [alertView show]; [alertView release];
and its delegation method:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex == 0)//OK button pressed { //do something } else if(buttonIndex == 1)//Annul button pressed. { //do something }
and everything is fine, but if I have another example of alertview "alertViewOne", I want this alertViewOne to have its own delegation method and should not use the delegation method of the first warning; how does my code change?
ios objective-c xcode uialertview
CrazyDev
source share