author | koda |
Wed, 05 Oct 2011 00:18:54 +0200 | |
changeset 6083 | 72c882c0fd0f |
child 6084 | e692c0348e74 |
permissions | -rw-r--r-- |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
1 |
/* |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
3 |
* Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com> |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
4 |
* |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
7 |
* the Free Software Foundation; version 2 of the License |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
8 |
* |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
13 |
* |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
17 |
* |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
18 |
* File created on 03/10/2011. |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
19 |
*/ |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
20 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
21 |
#import "MissionTrainingViewController.h" |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
22 |
#import <QuartzCore/QuartzCore.h> |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
23 |
#import "GameInterfaceBridge.h" |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
24 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
25 |
@implementation MissionTrainingViewController |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
26 |
@synthesize listOfMissions, previewImage, tableView, descriptionLabel, missionFile; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
27 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
28 |
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
29 |
return rotationManager(interfaceOrientation); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
30 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
31 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
32 |
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
33 |
-(void) viewDidLoad { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
34 |
srand(time(NULL)); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
35 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
36 |
NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png"; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
37 |
UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgName]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
38 |
self.view.backgroundColor = [UIColor colorWithPatternImage:img]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
39 |
[img release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
40 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
41 |
NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TRAININGS_DIRECTORY() error:NULL]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
42 |
self.listOfMissions = array; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
43 |
self.previewImage.layer.borderColor = [[UIColor darkYellowColor] CGColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
44 |
self.previewImage.layer.borderWidth = 3.8f; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
45 |
self.previewImage.layer.cornerRadius = 14; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
46 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
47 |
UIView *backView = [[UIView alloc] initWithFrame:self.tableView.frame]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
48 |
backView.backgroundColor = [UIColor darkBlueColorTransparent]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
49 |
[self.tableView setBackgroundView:backView]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
50 |
[backView release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
51 |
self.tableView.backgroundColor = [UIColor clearColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
52 |
self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
53 |
self.tableView.layer.borderWidth = 2; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
54 |
self.tableView.layer.cornerRadius = 8; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
55 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
56 |
self.descriptionLabel.textColor = [UIColor lightYellowColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
57 |
[super viewDidLoad]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
58 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
59 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
60 |
-(void) viewWillAppear:(BOOL)animated { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
61 |
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:random()%[self.listOfMissions count] inSection:0]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
62 |
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
63 |
[self tableView:self.tableView didSelectRowAtIndexPath:indexPath]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
64 |
[super viewWillAppear:animated]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
65 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
66 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
67 |
-(IBAction) buttonPressed:(id) sender { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
68 |
UIButton *button = (UIButton *)sender; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
69 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
70 |
if (button.tag == 0) { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
71 |
[AudioManagerController playBackSound]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
72 |
[[self parentViewController] dismissModalViewControllerAnimated:YES]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
73 |
} else { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
74 |
/* GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
75 |
[bridge startMissionGame:self.missionFile]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
76 |
[bridge release];*/ |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
77 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
78 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
79 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
80 |
#pragma mark Table view data source |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
81 |
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
82 |
return 1; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
83 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
84 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
85 |
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
86 |
return [self.listOfMissions count]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
87 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
88 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
89 |
-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
90 |
static NSString *CellIdentifier = @"CellTr"; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
91 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
92 |
UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
93 |
if (cell == nil) |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
94 |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
95 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
96 |
cell.textLabel.text = [[[self.listOfMissions objectAtIndex:[indexPath row]] stringByDeletingPathExtension] stringByReplacingOccurrencesOfString:@"_" withString:@" "]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
97 |
cell.textLabel.textColor = [UIColor lightYellowColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
98 |
//cell.textLabel.font = [UIFont fontWithName:@"Bradley Hand Bold" size:[UIFont labelFontSize]]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
99 |
cell.textLabel.textAlignment = UITextAlignmentCenter; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
100 |
cell.textLabel.backgroundColor = [UIColor clearColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
101 |
cell.backgroundColor = [UIColor blackColorTransparent]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
102 |
return cell; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
103 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
104 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
105 |
#pragma mark - |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
106 |
#pragma mark Table view delegate |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
107 |
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
108 |
NSString *missionName = [[self.listOfMissions objectAtIndex:[indexPath row]] stringByDeletingPathExtension]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
109 |
NSString *filePath = [[NSString alloc] initWithFormat:@"%@/Missions/Training/%@@2x.png",GRAPHICS_DIRECTORY(),missionName]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
110 |
UIImage *img = [[UIImage alloc] initWithContentsOfFile:filePath]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
111 |
[filePath release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
112 |
[self.previewImage setImage:img]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
113 |
[img release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
114 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
115 |
self.descriptionLabel.text = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
116 |
NSString *descLocation = [[NSString alloc] initWithFormat:@"%@/missions_en.txt",LOCALE_DIRECTORY()]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
117 |
NSString *descComplete = [[NSString alloc] initWithContentsOfFile:descLocation encoding:NSUTF8StringEncoding error:NULL]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
118 |
[descLocation release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
119 |
NSArray *descArray = [descComplete componentsSeparatedByString:@"\n"]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
120 |
[descComplete release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
121 |
for (NSString *str in descArray) { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
122 |
if ([str hasPrefix:missionName]) { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
123 |
NSArray *descriptionText = [str componentsSeparatedByString:@"\""]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
124 |
self.descriptionLabel.text = [descriptionText objectAtIndex:1]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
125 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
126 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
127 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
128 |
NSString *missionPath = [[NSString alloc] initWithFormat:@"%@/%@.lua",TRAININGS_DIRECTORY(),missionName]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
129 |
self.missionFile = missionPath; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
130 |
[missionPath release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
131 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
132 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
133 |
#pragma mark - |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
134 |
#pragma mark Memory management |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
135 |
-(void) didReceiveMemoryWarning { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
136 |
previewImage = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
137 |
missionFile = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
138 |
[super didReceiveMemoryWarning]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
139 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
140 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
141 |
-(void) viewDidUnload { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
142 |
self.listOfMissions = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
143 |
self.previewImage = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
144 |
self.tableView = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
145 |
self.descriptionLabel = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
146 |
self.missionFile = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
147 |
MSG_DIDUNLOAD(); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
148 |
[super viewDidUnload]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
149 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
150 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
151 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
152 |
-(void) dealloc { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
153 |
releaseAndNil(listOfMissions); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
154 |
releaseAndNil(previewImage); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
155 |
releaseAndNil(tableView); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
156 |
releaseAndNil(descriptionLabel); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
157 |
releaseAndNil(missionFile); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
158 |
[super dealloc]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
159 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
160 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
161 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
162 |
@end |