project_files/HedgewarsMobile/Classes/TableViewControllerWithDoneButton.m
branchios-develop
changeset 12872 00215a7ec5f5
parent 11217 e68b3e392091
equal deleted inserted replaced
12871:2c06b1120749 12872:00215a7ec5f5
    36     }
    36     }
    37 }
    37 }
    38 
    38 
    39 - (UIBarButtonItem *)doneButton
    39 - (UIBarButtonItem *)doneButton
    40 {
    40 {
    41     return [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
    41     return [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
    42                                                           target:self
    42                                                           target:self
    43                                                           action:@selector(dismissView)] autorelease];
    43                                                           action:@selector(dismissView)];
    44 }
    44 }
    45 
    45 
    46 - (void)dismissView
    46 - (void)dismissView
    47 {
    47 {
    48     [[AudioManagerController mainManager] playBackSound];
    48     [[AudioManagerController mainManager] playBackSound];
    49     [[[HedgewarsAppDelegate sharedAppDelegate] mainViewController] dismissViewControllerAnimated:YES completion:nil];
    49     UIViewController *vc = [[HedgewarsAppDelegate sharedAppDelegate] mainViewController];
       
    50     [vc dismissViewControllerAnimated:YES completion:nil];
    50 }
    51 }
    51 
    52 
    52 @end
    53 @end