Advertisement
Guest User

PFSignUpViewController

a guest
Jan 25th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. Here is my "PFSignUpViewController" code:
  2.  
  3. <pre> #pragma mark - PFSignUpViewControllerDelegate
  4.  
  5. // Sent to the delegate to determine whether the sign up request should be submitted to the server.
  6. - (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info {
  7. BOOL informationComplete = YES;
  8. for (id key in info) {
  9. NSString *field = [info objectForKey:key];
  10. if (!field || field.length == 0) {
  11. informationComplete = NO;
  12. break;
  13. }
  14. }
  15.  
  16. if (!informationComplete) {
  17. [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Fehlende Informationen", nil) message:NSLocalizedString(@"Stelle sicher das du alle Felder ausgefüllt hast!", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil] show];
  18. }
  19.  
  20.  
  21. return informationComplete;
  22. }
  23.  
  24. // Sent to the delegate when a PFUser is signed up.
  25. // Sent to the delegate when the sign up attempt fails.
  26. - (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error {
  27. NSLog(@"Failed to sign up...");
  28. }
  29. // Sent to the delegate when the sign up screen is dismissed.
  30. - (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController {
  31. NSLog(@"User dismissed the signUpViewController")
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement