Created
November 2, 2010 16:39
-
-
Save joecannatti/659909 to your computer and use it in GitHub Desktop.
tag property demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)someSituation{ | |
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; | |
alert.tag = 0; | |
[alert show]; | |
[alert release]; | |
} | |
-(void)someOtherSituation{ | |
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; | |
alert.tag = 1; | |
[alert show]; | |
[alert release]; | |
} | |
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex{ | |
if([alertView tag] == 0){ | |
//foo | |
} | |
else{ | |
//bar | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment