cocoaTouch/DetailViewController.m
author smxx
Sat, 05 Jun 2010 19:50:02 +0000
changeset 3498 1c74e277069c
parent 3490 016b3172b645
child 3513 f589230fa21b
permissions -rw-r--r--
Frontend: * Fixed main menu tips not showing up
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     1
    //
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     2
//  DetailViewController.m
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     3
//  HedgewarsMobile
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     4
//
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     5
//  Created by Vittorio on 27/03/10.
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     7
//
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     8
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
     9
#import "DetailViewController.h"
3312
6d8f1c76756d restore and update the old general settings
koda
parents: 3308
diff changeset
    10
#import "SDL_uikitappdelegate.h"
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    11
#import "GeneralSettingsViewController.h"
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    12
#import "TeamSettingsViewController.h"
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    13
#import "WeaponSettingsViewController.h"
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    14
#import "SchemeSettingsViewController.h"
3335
2520ee7a5484 new manager for handling (future) rotations
koda
parents: 3316
diff changeset
    15
#import "CommodityFunctions.h"
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    16
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    17
@implementation DetailViewController
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
    18
@synthesize controllerNames,popoverController;
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    19
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    20
3335
2520ee7a5484 new manager for handling (future) rotations
koda
parents: 3316
diff changeset
    21
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
2520ee7a5484 new manager for handling (future) rotations
koda
parents: 3316
diff changeset
    22
	return rotationManager(interfaceOrientation);
2520ee7a5484 new manager for handling (future) rotations
koda
parents: 3316
diff changeset
    23
}
2520ee7a5484 new manager for handling (future) rotations
koda
parents: 3316
diff changeset
    24
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
    25
-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
    26
    self.view.frame = CGRectMake(0, 0, 1024, 1024);
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
    27
}
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
    28
3357
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    29
-(void) viewDidLoad {
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    30
    self.title = NSLocalizedString(@"Settings",@"");
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    31
3316
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    32
    // allocate controllers and store them into the array
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    33
    NSArray *array= [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), 
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    34
                                                     NSLocalizedString(@"Teams",@""),
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    35
                                                     NSLocalizedString(@"Weapons",@""),
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    36
                                                     NSLocalizedString(@"Schemes",@""),
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    37
                                                     nil];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    38
    self.controllerNames = array;
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    39
    [array release];
3316
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    40
    
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    41
    // on ipad make the general setting the first view, on iphone add the "Done" button on top left
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    42
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    43
        
3357
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    44
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(112, 112, 480, 320)];
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    45
        label.text = @"Press the buttons on the left";
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    46
        label.font = [UIFont systemFontOfSize:20];
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    47
        label.textAlignment = UITextAlignmentCenter;
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    48
        [self.view addSubview:label];
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    49
        [label release];
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    50
        
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    51
        //[self.navigationController pushViewController:nextController animated:NO];
3316
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    52
    } else {
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    53
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    54
                                                                                              target:self
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    55
                                                                                              action:@selector(dismissSplitView)];
3316
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    56
    }
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
    57
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    58
    [super viewDidLoad];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    59
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    60
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    61
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    62
#pragma mark -
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    63
#pragma mark Table view data source
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    64
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
3357
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    65
    // don't display 
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    66
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    67
        return 0;
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    68
    else
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    69
        return 1;
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    70
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    71
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    72
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    73
    return [controllerNames count];
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    74
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    75
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    76
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    77
    static NSString *CellIdentifier = @"Cell";
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    78
    
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    79
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    80
    if (cell == nil) {
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    81
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    82
                                       reuseIdentifier:CellIdentifier] autorelease];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    83
    }
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    84
    
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    85
    NSInteger row = [indexPath row];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    86
    
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    87
    cell.textLabel.text = [controllerNames objectAtIndex:row];
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    88
    cell.imageView.image = [UIImage imageNamed:@"Icon.png"];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    89
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    90
    
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    91
    return cell;
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    92
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    93
3357
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    94
#pragma mark -
3836a31879e7 draw a hedgehog when presenting hats
koda
parents: 3356
diff changeset
    95
#pragma mark Table view delegate
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    96
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
    97
    NSInteger row = [indexPath row];
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3357
diff changeset
    98
    UIViewController *nextController = nil;
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
    99
    
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   100
    switch (row) {
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   101
        case 0:
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   102
            if (nil == generalSettingsViewController)
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   103
                generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   104
            nextController = generalSettingsViewController;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   105
            break;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   106
        case 1:
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   107
            if (nil == teamSettingsViewController)
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   108
                teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   109
            nextController = teamSettingsViewController;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   110
            break;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   111
        case 2:
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   112
            if (nil == weaponSettingsViewController)
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   113
                weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   114
            nextController = weaponSettingsViewController;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   115
            break;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   116
        case 3:
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   117
            if (nil == schemeSettingsViewController)
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   118
                schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   119
            nextController = schemeSettingsViewController;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   120
            break;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   121
    }
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   122
    
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   123
    nextController.title = [controllerNames objectAtIndex:row];
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   124
    [self.navigationController pushViewController:nextController animated:YES];
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   125
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   126
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   127
-(IBAction) dismissSplitView {
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   128
    [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil];
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   129
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   130
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   131
#pragma mark -
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   132
#pragma mark splitview support
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   133
-(void) splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController {
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   134
    if (popoverController != nil) {
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   135
        [popoverController dismissPopoverAnimated:YES];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   136
    }
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   137
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   138
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   139
// Called when the master view controller is about to be hidden
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   140
-(void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController 
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   141
            withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc {
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   142
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   143
  /*  barButtonItem.title = @"Master View";
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   144
    UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   145
    NSMutableArray *items = [[toolbar items] mutableCopy];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   146
    [items insertObject:barButtonItem atIndex:0];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   147
    [toolbar setItems:items animated:YES];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   148
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   149
    [items release];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   150
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   151
    self.popoverController = pc;*/
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   152
    barButtonItem.title = aViewController.title;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   153
    self.navigationItem.rightBarButtonItem = barButtonItem;
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   154
}
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   155
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   156
// Called when the master view controller is about to appear
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   157
-(void) splitViewController: (UISplitViewController*)svc  willShowViewController:(UIViewController *)aViewController 
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   158
            invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   159
    /*UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
3316
52f0482b043f fix a couple of leaks in hte ifrontend
koda
parents: 3312
diff changeset
   160
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   161
    NSMutableArray *items = [[toolbar items] mutableCopy];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   162
    [items removeObjectAtIndex:0];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   163
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   164
    [toolbar setItems:items animated:YES];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   165
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   166
    [items release];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   167
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   168
    self.popoverController = nil;*/
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   169
        self.navigationItem.rightBarButtonItem = nil;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   170
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   171
}
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   172
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   173
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   174
-(void) didReceiveMemoryWarning {
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   175
    // Releases the view if it doesn't have a superview.
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   176
    [super didReceiveMemoryWarning];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   177
    // Release any cached data, images, etc that aren't in use.
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   178
    if (generalSettingsViewController.view.superview == nil)
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   179
        generalSettingsViewController = nil;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   180
    if (teamSettingsViewController.view.superview == nil)
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   181
        teamSettingsViewController = nil;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   182
    if (weaponSettingsViewController.view.superview == nil)
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   183
        weaponSettingsViewController = nil;
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   184
    if (schemeSettingsViewController.view.superview == nil)
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   185
        schemeSettingsViewController = nil;
3487
b1d00f1950c8 add some memory aware code
koda
parents: 3374
diff changeset
   186
    MSG_MEMCLEAN();
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   187
}
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   188
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   189
-(void) viewDidUnload {
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   190
    self.controllerNames = nil;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   191
    generalSettingsViewController = nil;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   192
    teamSettingsViewController = nil;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   193
    weaponSettingsViewController = nil;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   194
    schemeSettingsViewController = nil;
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   195
    [super viewDidUnload];
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   196
    MSG_DIDUNLOAD();
3356
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   197
}
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   198
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   199
-(void) dealloc {
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   200
    [controllerNames release];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   201
    [generalSettingsViewController release];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   202
    [teamSettingsViewController release];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   203
    [weaponSettingsViewController release];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   204
    [schemeSettingsViewController release];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   205
    [super dealloc];
3ae3fccb439e add missing controller stubs
koda
parents: 3335
diff changeset
   206
}
3305
91074496d5c9 merged code from ipad and iphone frontends
koda
parents:
diff changeset
   207
@end