cocoaTouch/DetailViewController.m
changeset 3312 6d8f1c76756d
parent 3308 b6dcae4b6d2c
child 3316 52f0482b043f
equal deleted inserted replaced
3311:18436bb84bfe 3312:6d8f1c76756d
     5 //  Created by Vittorio on 27/03/10.
     5 //  Created by Vittorio on 27/03/10.
     6 //  Copyright 2010 __MyCompanyName__. All rights reserved.
     6 //  Copyright 2010 __MyCompanyName__. All rights reserved.
     7 //
     7 //
     8 
     8 
     9 #import "DetailViewController.h"
     9 #import "DetailViewController.h"
       
    10 #import "SDL_uikitappdelegate.h"
    10 #import "TeamSettingsViewController.h"
    11 #import "TeamSettingsViewController.h"
    11 #import "SDL_uikitappdelegate.h"
    12 #import "GeneralSettingsViewController.h"
    12 
    13 
    13 @implementation DetailViewController
    14 @implementation DetailViewController
    14 @synthesize popoverController, controllers;
    15 @synthesize popoverController, controllers;
    15 
    16 
    16 
    17 
    20     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
    21     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
    21         self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:0 target:self action:@selector(dismissSplitView)];
    22         self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:0 target:self action:@selector(dismissSplitView)];
    22 
    23 
    23     NSMutableArray *array= [[NSMutableArray alloc] init];
    24     NSMutableArray *array= [[NSMutableArray alloc] init];
    24 
    25 
       
    26     GeneralSettingsViewController *generalSettingsViewController = [[GeneralSettingsViewController alloc]
       
    27                                                                     initWithStyle:UITableViewStyleGrouped];
       
    28     generalSettingsViewController.title = NSLocalizedString(@"General",@"");
       
    29     [array addObject:generalSettingsViewController];
       
    30     [generalSettingsViewController release];
       
    31     
    25     TeamSettingsViewController *teamSettingsViewController = [[TeamSettingsViewController alloc] 
    32     TeamSettingsViewController *teamSettingsViewController = [[TeamSettingsViewController alloc] 
    26                                                               initWithStyle:UITableViewStyleGrouped];
    33                                                               initWithStyle:UITableViewStyleGrouped];
    27     teamSettingsViewController.title = NSLocalizedString(@"Teams",@"");
    34     teamSettingsViewController.title = NSLocalizedString(@"Teams",@"");
    28 
       
    29     [array addObject:teamSettingsViewController];
    35     [array addObject:teamSettingsViewController];
    30     [teamSettingsViewController release];
    36     [teamSettingsViewController release];
    31     
    37     
    32     self.controllers = array;
    38     self.controllers = array;
    33     [array release];
    39     [array release];