Guest User

Untitled

a guest
Jun 1st, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. - (void)loadData {
  2. GetWhateverRequest* req =
  3. [[GetWhateverRequest alloc] initWithUsername:@"username" password:@"password";
  4. [req fetch:self];
  5. }
  6.  
  7. - (void)restRequestSuccess:(id)results {
  8. NSLog(@"Woot. We're loading shit up!");
  9. /**This particular call returns a hash/associate array/dictionary so let's cast to that **/
  10. results = (NSDictionary*) results;
  11. whateverLabel.text = [results valueForKey:@"whatever"];
  12. }
  13.  
  14. - (void)restRequestFailure:(id)code message:(id)message {
  15. /** Handle a failure here **/
  16. NSLog(@"Something went wrong. do something about it ");
  17. }
Add Comment
Please, Sign In to add comment