cocoaTouch/TeamConfigViewController.m
author sheepluva
Wed, 16 Jun 2010 21:14:23 +0200
changeset 3508 a7ca07614a2d
parent 3490 016b3172b645
permissions -rw-r--r--
correct cake sit-down animation so that it doesn't sit down in mid-air anymore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     1
//
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     2
//  TeamConfigViewController.m
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     3
//  HedgewarsMobile
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     4
//
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     5
//  Created by Vittorio on 20/04/10.
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     7
//
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     8
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
     9
#import "TeamConfigViewController.h"
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    10
#import "CommodityFunctions.h"
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    11
#import "HogButtonView.h"
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    12
#import "SquareButtonView.h"
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    13
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    14
@implementation TeamConfigViewController
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    15
@synthesize listOfTeams, listOfSelectedTeams;
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    16
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    17
#define NUMBERBUTTON_TAG 123456
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    18
#define SQUAREBUTTON_TAG 654321
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    19
#define LABEL_TAG        456123
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    20
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    21
#pragma mark -
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    22
#pragma mark View lifecycle
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    23
-(void) viewDidLoad {
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    24
    [super viewDidLoad];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    25
    
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    26
    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    27
    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    28
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    29
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    30
-(void) viewWillAppear:(BOOL)animated {
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    31
    [super viewWillAppear:animated];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    32
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
    33
    // integer representation of various color (defined in SquareButtonView)
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
    34
    NSUInteger colors[6] = { 4421353, 4100897, 10632635, 16749353, 14483456, 7566195 };
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    35
    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    36
    NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[contentsOfDir count]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    37
    for (int i = 0; i < [contentsOfDir count]; i++) {
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    38
        NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    39
                                                                  [contentsOfDir objectAtIndex:i],@"team",
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    40
                                                                  [NSNumber numberWithInt:4],@"number",
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    41
                                                                  [NSNumber numberWithInt:colors[i%6]],@"color",nil];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    42
        [array addObject:dict];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    43
        [dict release];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    44
    }
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    45
    self.listOfTeams = array;
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    46
    [array release];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    47
    
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    48
    NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    49
    self.listOfSelectedTeams = emptyArray;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    50
    [emptyArray release];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    51
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    52
    [self.tableView reloadData];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    53
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    54
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    55
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    56
    return rotationManager(interfaceOrientation);
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    57
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    58
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    59
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    60
#pragma mark -
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    61
#pragma mark Table view data source
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    62
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    63
    return 2;
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    64
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    65
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    66
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    67
    if (section == 0)
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    68
        return [listOfSelectedTeams count] ;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    69
    else
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    70
        return [listOfTeams count];
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    71
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    72
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    73
-(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section {
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    74
    if (section == 0)
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    75
        return NSLocalizedString(@"Playing Teams",@"");
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    76
    else
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    77
        return NSLocalizedString(@"Available Teams",@"");
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    78
}
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    79
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    80
// Customize the appearance of table view cells.
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
    81
-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    82
    static NSString *CellIdentifier0 = @"Cell0";
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    83
    static NSString *CellIdentifier1 = @"Cell1";
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    84
    NSInteger section = [indexPath section];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    85
    UITableViewCell *cell;
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
    86
    
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    87
    if (section == 0) {
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
    88
        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    89
        if (cell == nil) {
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    90
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    91
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    92
            UIButton *numberButton = [[HogButtonView alloc] initWithFrame:CGRectMake(12, 5, 88, 32)];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    93
            numberButton.tag = NUMBERBUTTON_TAG;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    94
            [cell addSubview:numberButton];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    95
            [numberButton release];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    96
            
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    97
            SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+7, 5, 36, 36)];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    98
            squareButton.tag = SQUAREBUTTON_TAG;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
    99
            [cell addSubview:squareButton];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   100
            [squareButton release];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   101
            
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   102
            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+7+36+7, 10, 250, 25)];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   103
            label.textAlignment = UITextAlignmentLeft;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   104
            label.backgroundColor = [UIColor clearColor];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   105
            label.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   106
            label.tag = LABEL_TAG;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   107
            [cell.contentView addSubview:label];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   108
            [label release];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   109
        }
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   110
        
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   111
        NSMutableDictionary *selectedRow = [listOfSelectedTeams objectAtIndex:[indexPath row]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   112
        
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   113
        UILabel *cellLabel = (UILabel *)[cell viewWithTag:LABEL_TAG];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   114
        cellLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   115
        
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   116
        HogButtonView *numberButton = (HogButtonView *)[cell viewWithTag:NUMBERBUTTON_TAG];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   117
        [numberButton drawManyHogs:[[selectedRow objectForKey:@"number"] intValue]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   118
        numberButton.ownerDictionary = selectedRow;
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   119
        
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   120
        SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   121
        [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   122
        squareButton.ownerDictionary = selectedRow;
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   123
    } else {
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
   124
        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   125
        if (cell == nil) 
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   126
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   127
        
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   128
        cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   129
    }
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   130
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   131
    return cell;
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   132
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   133
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   134
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   135
#pragma mark -
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   136
#pragma mark Table view delegate
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
   137
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   138
    NSInteger row = [indexPath row];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   139
    NSInteger section = [indexPath section];
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   140
3364
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   141
    if (section == 0) {
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   142
        [self.listOfTeams addObject:[self.listOfSelectedTeams objectAtIndex:row]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   143
        [self.listOfSelectedTeams removeObjectAtIndex:row];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   144
    } else {
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   145
        [self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]];
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   146
        [self.listOfTeams removeObjectAtIndex:row];      
e5403e2bf02c no more hardcoded teams, team selection is real \o/
koda
parents: 3361
diff changeset
   147
    }
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
   148
    [aTableView reloadData];
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   149
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   150
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   151
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   152
#pragma mark -
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   153
#pragma mark Memory management
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   154
-(void) didReceiveMemoryWarning {
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   155
    // Releases the view if it doesn't have a superview.
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   156
    [super didReceiveMemoryWarning];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   157
    // Relinquish ownership any cached data, images, etc that aren't in use.
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   158
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   159
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   160
-(void) viewDidUnload {
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   161
    self.listOfTeams = nil;
3490
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   162
    [super viewDidUnload];
016b3172b645 a bunch of minor stuff
koda
parents: 3487
diff changeset
   163
    MSG_DIDUNLOAD();
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   164
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   165
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   166
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   167
-(void) dealloc {
3374
0d522416d97f lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents: 3365
diff changeset
   168
    [self.listOfTeams release];
3361
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   169
    [super dealloc];
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   170
}
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   171
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   172
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   173
@end
cfc6cd502f85 buttons for number of hogs in game config
koda
parents:
diff changeset
   174