Guest User

Untitled

a guest
Jun 25th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. -(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
  2. {
  3. NSString *msg;
  4. NSString *prog;
  5. NSString *game;
  6. NSString *movie;
  7. NSString *inter;
  8. NSString *book;
  9. NSString *sport;
  10.  
  11. if(buttonIndex != [actionSheet cancelButtonIndex])
  12. {
  13. if (Programming.on == TRUE || Games.on == TRUE || Movies.on == TRUE || Internet.on == TRUE || Sports.on == TRUE || Books.on == TRUE)
  14. {
  15. prog =@"Yes";
  16. game =@"Yes";
  17. movie =@"Yes";
  18. inter =@"Yes";
  19. book =@"Yes";
  20. sport =@"Yes";
  21. }
  22. else
  23. {
  24. prog =@"No";
  25. game =@"No";
  26. movie =@"No";
  27. inter =@"No";
  28. book =@"No";
  29. sport =@"No";
  30. }
  31. msg = [[NSString alloc] initWithFormat:@"User created with the following preferences: \n Username:%@ \n Password:%@ \n Semester:%@ Major:%@ \n The user has the following interests: \n Programming:%@", UsernameText.text, PasswordText.text, Number.text, MajorText.text, prog];
  32. }
  33. UIAlertView *alert=[[UIAlertView alloc]
  34. initWithTitle:@"Success"
  35. message:msg
  36. delegate:self
  37. cancelButtonTitle:@"Cancel"
  38. otherButtonTitles:nil];
  39. [alert show];
  40. [alert release];
  41. [msg release];
  42.  
  43. }
Add Comment
Please, Sign In to add comment