Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int result = system(...);
- NSString *message, *title;
- if (result == 0) {
- title = @"Success!";
- message = @"Operation succeeded.";
- } else {
- title =@"Failure!"
- message = [[NSString alloc] initWithFormat:@"Operation failed with error %d!", result];
- }
- //display message
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
- [alert show]
- [alert release]
Add Comment
Please, Sign In to add comment