Skip to content

Commit

Permalink
addind create dismiss on create loot viewcontroller
Browse files Browse the repository at this point in the history
  • Loading branch information
cakl committed Apr 16, 2014
1 parent e0227cd commit fce238a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lootr/CreateLootViewController.m
Expand Up @@ -57,7 +57,7 @@ - (void)didReceiveMemoryWarning {
}

- (void)cancelButtonPressed {
[self dismissViewControllerAnimated:YES completion:nil];
[self dismissSelfViewController];
}

- (void)createButtonPressed {
Expand Down Expand Up @@ -86,8 +86,14 @@ - (void)createButtonPressed {
- (void)postLoot:(Loot *)loot {
[self.serverCaller postLoot:loot onSuccess:^(Loot *loot) {
NSLog(@"%@", loot);
[self dismissSelfViewController];
}
onFailure:^(NSError *error) { NSLog(@"%@", error); }];
onFailure:^(NSError *error) { NSLog(@"%@", error); }];
}

-(void)dismissSelfViewController
{
[self dismissViewControllerAnimated:YES completion:nil];
}

@end

0 comments on commit fce238a

Please sign in to comment.