Guest User

Untitled

a guest
May 20th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int result = system(...);
  2. NSString *message, *title;
  3. if (result == 0) {
  4.   title = @"Success!";
  5.   message = @"Operation succeeded.";
  6. } else {
  7.   title =@"Failure!"
  8.   message = [[NSString alloc] initWithFormat:@"Operation failed with error %d!", result];
  9. }
  10.  
  11. //display message
  12. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
  13. [alert show]
  14. [alert release]
Add Comment
Please, Sign In to add comment