Guest User

Untitled

a guest
Jul 21st, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. - (IBAction) post: (id) sender{
  2. TwitterRequest * t = [[TwitterRequest alloc] init];
  3. t.err = TRUE;
  4. t.username = usernames.text;
  5. t.password = passwords.text;
  6. [t statuses_update:twittermessage.text delegate:self requestSelector:@selector(status_updateCallback:)];
  7. loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Posting to Twitter..." delegate:nil
  8. cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
  9. [loadingActionSheet showInView:self.view];
  10. if (t.callback == ???) {
  11. [loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
  12. [loadingActionSheet release];
  13. UIAlertView *alert;
  14. alert = [[UIAlertView alloc] initWithTitle:@"Ouch!"
  15. message:@"Your Username or Password is wrong!"
  16. delegate:self
  17. cancelButtonTitle:@"OK"
  18. otherButtonTitles: nil];
  19. [alert show];
  20. [alert release];
  21. }
  22. }
  23.  
  24.  
  25. - (void) status_updateCallback: (NSData *) content {
  26. [loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
  27. [loadingActionSheet release];
  28. NSLog(@"%@",[[NSString alloc] initWithData:content encoding:NSASCIIStringEncoding]);
Add Comment
Please, Sign In to add comment