author | antonc27 <antonc27@mail.ru> |
Thu, 22 Oct 2015 03:00:22 +0200 | |
branch | ios-revival |
changeset 11230 | 628ac6f8a41e |
parent 11224 | 32366eb83383 |
child 11243 | a954853e9c00 |
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 |
6700 | 3 |
* Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com> |
6083
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 |
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
6908
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6083
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 |
|
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
19 |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
20 |
#import "MissionTrainingViewController.h" |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
21 |
#import <QuartzCore/QuartzCore.h> |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
22 |
#import "GameInterfaceBridge.h" |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
23 |
|
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
24 |
|
6083
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 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
27 |
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
28 |
return rotationManager(interfaceOrientation); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
29 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
30 |
|
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
31 |
#pragma mark - |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
32 |
#pragma mark View management |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
33 |
-(void) viewDidLoad |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
34 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
35 |
[super viewDidLoad]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
36 |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
37 |
self.previewImage.layer.borderColor = [[UIColor darkYellowColor] CGColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
38 |
self.previewImage.layer.borderWidth = 3.8f; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
39 |
self.previewImage.layer.cornerRadius = 14; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
40 |
|
6210
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
41 |
if (IS_IPAD()) { |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
42 |
[self.tableView setBackgroundColorForAnyTable:[UIColor darkBlueColorTransparent]]; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
43 |
self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor]; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
44 |
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
45 |
} else { |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
46 |
[self.tableView setBackgroundColorForAnyTable:[UIColor blackColorTransparent]]; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
47 |
self.tableView.layer.borderColor = [[UIColor whiteColor] CGColor]; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
48 |
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; |
923c8414e3af
fix runtime compability with ios 3.* (hopefully) and fix a small glitch in turning off music/sounds
koda
parents:
6100
diff
changeset
|
49 |
} |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
50 |
self.tableView.layer.borderWidth = 2.4f; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
51 |
self.tableView.layer.cornerRadius = 8; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
52 |
self.tableView.separatorColor = [UIColor whiteColor]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
53 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
54 |
self.descriptionLabel.textColor = [UIColor lightYellowColor]; |
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 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
57 |
-(void) viewWillAppear:(BOOL)animated { |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
58 |
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:arc4random_uniform((int)[self.listOfMissionIDs count]) inSection:0]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
59 |
[self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionMiddle]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
60 |
[self tableView:self.tableView didSelectRowAtIndexPath:indexPath]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
61 |
[super viewWillAppear:animated]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
62 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
63 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
64 |
-(IBAction) buttonPressed:(id) sender { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
65 |
UIButton *button = (UIButton *)sender; |
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 |
if (button.tag == 0) { |
6869
a187c280dd3d
ios: convert audio operation from class to instance, plays better with memory
koda
parents:
6832
diff
changeset
|
68 |
[[AudioManagerController mainManager] playBackSound]; |
11116
102684240fe8
- Interscreen transitions fixed
Anton Malmygin <antonc27@mail.ru>
parents:
10108
diff
changeset
|
69 |
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
70 |
} else { |
6353
d8f62c805619
restore displaying statistics at the end of a game and restore warning lower views that they are going to appear
koda
parents:
6266
diff
changeset
|
71 |
[GameInterfaceBridge registerCallingController:self]; |
6266
b02a1e92dba2
convert gameinterfacebridge in simple-to-use class methods
koda
parents:
6210
diff
changeset
|
72 |
[GameInterfaceBridge startMissionGame:self.missionName]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
73 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
74 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
75 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
76 |
#pragma mark - Missions dictionaries methods |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
77 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
78 |
- (NSDictionary *)newLocalizedMissionsDictionary |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
79 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
80 |
NSString *languageID = [HWUtils languageID]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
81 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
82 |
NSString *missionsDescLocation = [[NSString alloc] initWithFormat:@"%@/missions_en.txt",LOCALE_DIRECTORY()]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
83 |
NSString *localizedMissionsDescLocation = [[NSString alloc] initWithFormat:@"%@/missions_%@.txt", LOCALE_DIRECTORY(), languageID]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
84 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
85 |
if (![languageID isEqualToString:@"en"] && [[NSFileManager defaultManager] fileExistsAtPath:localizedMissionsDescLocation]) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
86 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
87 |
NSDictionary *missionsDict = [self newMissionsDictionaryFromMissionsFile:missionsDescLocation]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
88 |
NSDictionary *localizedMissionsDict = [self newMissionsDictionaryFromMissionsFile:localizedMissionsDescLocation]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
89 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
90 |
[missionsDescLocation release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
91 |
[localizedMissionsDescLocation release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
92 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
93 |
NSMutableDictionary *tempMissionsDict = [[NSMutableDictionary alloc] init]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
94 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
95 |
for (NSString *key in [missionsDict allKeys]) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
96 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
97 |
if ([localizedMissionsDict objectForKey:key]) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
98 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
99 |
[tempMissionsDict setObject:[localizedMissionsDict objectForKey:key] forKey:key]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
100 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
101 |
else |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
102 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
103 |
[tempMissionsDict setObject:[missionsDict objectForKey:key] forKey:key]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
104 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
105 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
106 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
107 |
[missionsDict release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
108 |
[localizedMissionsDict release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
109 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
110 |
return tempMissionsDict; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
111 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
112 |
else |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
113 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
114 |
NSDictionary *missionsDict = [self newMissionsDictionaryFromMissionsFile:missionsDescLocation]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
115 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
116 |
[missionsDescLocation release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
117 |
[localizedMissionsDescLocation release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
118 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
119 |
return missionsDict; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
120 |
} |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
121 |
} |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
122 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
123 |
- (NSDictionary *)newMissionsDictionaryFromMissionsFile:(NSString *)filePath |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
124 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
125 |
NSMutableDictionary *missionsDict = [[NSMutableDictionary alloc] init]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
126 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
127 |
NSString *missionsFileContents = [[NSString alloc] initWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:NULL]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
128 |
NSArray *missionsLines = [missionsFileContents componentsSeparatedByString:@"\n"]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
129 |
[missionsFileContents release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
130 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
131 |
for (NSString *line in missionsLines) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
132 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
133 |
if ([line length] > 0) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
134 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
135 |
NSUInteger firstDotLocation = [line rangeOfString:@"."].location; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
136 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
137 |
NSString *missionID = [line substringToIndex:firstDotLocation]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
138 |
NSString *nameOrDesc = [line substringFromIndex:firstDotLocation+1]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
139 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
140 |
NSString *missionParsedName = ([nameOrDesc hasPrefix:@"name="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"name=" withString:@""] : nil; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
141 |
NSString *missionParsedDesc = ([nameOrDesc hasPrefix:@"desc="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"desc=" withString:@""] : nil; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
142 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
143 |
if (![missionsDict objectForKey:missionID]) |
11119
f08d5bb1d2b0
- Fix for loading missions descriptions
antonc27 <antonc27@mail.ru>
parents:
11116
diff
changeset
|
144 |
{ |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
145 |
NSMutableDictionary *missionDict = [[NSMutableDictionary alloc] init]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
146 |
[missionsDict setObject:missionDict forKey:missionID]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
147 |
[missionDict release]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
148 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
149 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
150 |
NSMutableDictionary *missionDict = [missionsDict objectForKey:missionID]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
151 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
152 |
if (missionParsedName) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
153 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
154 |
[missionDict setObject:missionParsedName forKey:@"name"]; |
11119
f08d5bb1d2b0
- Fix for loading missions descriptions
antonc27 <antonc27@mail.ru>
parents:
11116
diff
changeset
|
155 |
} |
f08d5bb1d2b0
- Fix for loading missions descriptions
antonc27 <antonc27@mail.ru>
parents:
11116
diff
changeset
|
156 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
157 |
if (missionParsedDesc) |
11119
f08d5bb1d2b0
- Fix for loading missions descriptions
antonc27 <antonc27@mail.ru>
parents:
11116
diff
changeset
|
158 |
{ |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
159 |
missionParsedDesc = [missionParsedDesc stringByReplacingOccurrencesOfString:@"\"" withString:@""]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
160 |
[missionDict setObject:missionParsedDesc forKey:@"desc"]; |
11119
f08d5bb1d2b0
- Fix for loading missions descriptions
antonc27 <antonc27@mail.ru>
parents:
11116
diff
changeset
|
161 |
} |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
162 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
163 |
[missionsDict setObject:missionDict forKey:missionID]; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
164 |
} |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
165 |
} |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
166 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
167 |
return missionsDict; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
168 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
169 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
170 |
#pragma mark - |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
171 |
#pragma mark override setters/getters for better memory handling |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
172 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
173 |
-(NSArray *)listOfMissionIDs |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
174 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
175 |
if (!_listOfMissionIDs) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
176 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
177 |
NSArray *sortedKeys = [[self.dictOfMissions allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
178 |
_listOfMissionIDs = [[NSArray alloc] initWithArray:sortedKeys]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
179 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
180 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
181 |
return _listOfMissionIDs; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
182 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
183 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
184 |
- (NSDictionary *)dictOfMissions |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
185 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
186 |
if (!_dictOfMissions) |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
187 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
188 |
_dictOfMissions = [self newLocalizedMissionsDictionary]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
189 |
} |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
190 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
191 |
return _dictOfMissions; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
192 |
} |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
193 |
|
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
194 |
#pragma mark - |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
195 |
#pragma mark Table view data source |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
196 |
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
197 |
return 1; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
198 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
199 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
200 |
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
201 |
return [self.listOfMissionIDs count]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
202 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
203 |
|
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
204 |
-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
205 |
return (IS_IPAD()) ? self.tableView.rowHeight : 80; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
206 |
} |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
207 |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
208 |
-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
209 |
static NSString *CellIdentifier = @"CellTr"; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
210 |
NSInteger row = [indexPath row]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
211 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
212 |
UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
213 |
if (cell == nil) |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
214 |
cell = [[[UITableViewCell alloc] initWithStyle:(IS_IPAD()) ? UITableViewCellStyleDefault : UITableViewCellStyleSubtitle |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
215 |
reuseIdentifier:CellIdentifier] autorelease]; |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
216 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
217 |
NSString *missionID = [self.listOfMissionIDs objectAtIndex:row]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
218 |
cell.textLabel.text = self.dictOfMissions[missionID][@"name"]; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
219 |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
220 |
cell.textLabel.textColor = [UIColor lightYellowColor]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
221 |
//cell.textLabel.font = [UIFont fontWithName:@"Bradley Hand Bold" size:[UIFont labelFontSize]]; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
222 |
cell.textLabel.textAlignment = (IS_IPAD()) ? UITextAlignmentCenter : UITextAlignmentLeft; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
223 |
cell.textLabel.backgroundColor = [UIColor clearColor]; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
224 |
cell.textLabel.adjustsFontSizeToFitWidth = YES; |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
225 |
cell.detailTextLabel.text = (IS_IPAD()) ? nil : self.dictOfMissions[missionID][@"desc"]; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
226 |
cell.detailTextLabel.textColor = [UIColor whiteColor]; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
227 |
cell.detailTextLabel.backgroundColor = [UIColor clearColor]; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
228 |
cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
229 |
cell.detailTextLabel.numberOfLines = ([cell.detailTextLabel.text length] % 40); |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
230 |
cell.detailTextLabel.baselineAdjustment = UIBaselineAdjustmentAlignCenters; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
231 |
|
11222
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
232 |
UIView *bgColorView = [[UIView alloc] init]; |
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
233 |
bgColorView.backgroundColor = [UIColor colorWithRed:(85.0/255.0) green:(15.0/255.0) blue:(106.0/255.0) alpha:1.0]; |
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
234 |
bgColorView.layer.masksToBounds = YES; |
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
235 |
cell.selectedBackgroundView = bgColorView; |
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
236 |
[bgColorView release]; |
08f20ffa5801
- Small adjust for cell selection color of Missions screen
antonc27 <antonc27@mail.ru>
parents:
11210
diff
changeset
|
237 |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
238 |
cell.backgroundColor = [UIColor blackColorTransparent]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
239 |
return cell; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
240 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
241 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
242 |
#pragma mark - |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
243 |
#pragma mark Table view delegate |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
244 |
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
245 |
NSInteger row = [indexPath row]; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
246 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
247 |
self.missionName = [self.listOfMissionIDs objectAtIndex:row]; |
6100 | 248 |
NSString *size = IS_IPAD() ? @"@2x" : @""; |
249 |
NSString *filePath = [[NSString alloc] initWithFormat:@"%@/Missions/Training/%@%@.png",GRAPHICS_DIRECTORY(),self.missionName,size]; |
|
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
250 |
UIImage *img = [[UIImage alloc] initWithContentsOfFile:filePath]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
251 |
[filePath release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
252 |
[self.previewImage setImage:img]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
253 |
[img release]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
254 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
255 |
self.descriptionLabel.text = self.dictOfMissions[self.missionName][@"desc"]; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
256 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
257 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
258 |
#pragma mark - |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
259 |
#pragma mark Memory management |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
260 |
|
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
261 |
-(void) didReceiveMemoryWarning |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
262 |
{ |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
263 |
self.previewImage = nil; |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
264 |
self.missionName = nil; |
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
265 |
self.listOfMissionIDs = nil; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
266 |
self.dictOfMissions = nil; |
6094
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
267 |
// if you nil this one it won't get updated anymore |
16b12a6417d1
added iphone interface for missions/trainings page, setters/getters unlocked
koda
parents:
6084
diff
changeset
|
268 |
//self.previewImage = nil; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
269 |
[super didReceiveMemoryWarning]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
270 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
271 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
272 |
-(void) viewDidUnload |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
273 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
274 |
self.listOfMissionIDs = nil; |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
275 |
self.dictOfMissions = nil; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
276 |
self.previewImage = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
277 |
self.tableView = nil; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
278 |
self.descriptionLabel = nil; |
6084 | 279 |
self.missionName = nil; |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
280 |
MSG_DIDUNLOAD(); |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
281 |
[super viewDidUnload]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
282 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
283 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
284 |
|
11224
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
285 |
-(void) dealloc |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
286 |
{ |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
287 |
releaseAndNil(_listOfMissionIDs); |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
288 |
releaseAndNil(_dictOfMissions); |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
289 |
releaseAndNil(_previewImage); |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
290 |
releaseAndNil(_tableView); |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
291 |
releaseAndNil(_descriptionLabel); |
32366eb83383
- Refactoring of Missions screen:
antonc27 <antonc27@mail.ru>
parents:
11222
diff
changeset
|
292 |
releaseAndNil(_missionName); |
6083
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
293 |
[super dealloc]; |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
294 |
} |
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
295 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
296 |
|
72c882c0fd0f
first pass for implementing missions/training selection on ipad (not yet running)
koda
parents:
diff
changeset
|
297 |
@end |