Commit f0c0dcaa6cce0fbd85ae9ff9607659735671906e
1 parent
93e76289
--no commit message
Showing
11 changed files
with
150 additions
and
42 deletions
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj
... | ... | @@ -382,6 +382,7 @@ |
382 | 382 | CLANG_WARN_INT_CONVERSION = YES; |
383 | 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
384 | 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
385 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | |
385 | 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
386 | 387 | COPY_PHASE_STRIP = NO; |
387 | 388 | GCC_C_LANGUAGE_STANDARD = gnu99; |
... | ... | @@ -421,6 +422,7 @@ |
421 | 422 | CLANG_WARN_INT_CONVERSION = YES; |
422 | 423 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
423 | 424 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
425 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | |
424 | 426 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
425 | 427 | COPY_PHASE_STRIP = YES; |
426 | 428 | ENABLE_NS_ASSERTIONS = NO; | ... | ... |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
... | ... | @@ -17,6 +17,52 @@ |
17 | 17 | endingLineNumber = "20" |
18 | 18 | landmarkName = "+sharedProtocol" |
19 | 19 | landmarkType = "5"> |
20 | + <Locations> | |
21 | + <Location | |
22 | + shouldBeEnabled = "Yes" | |
23 | + ignoreCount = "0" | |
24 | + continueAfterRunningActions = "No" | |
25 | + symbolName = "+[CommunicationProtocol sharedProtocol]" | |
26 | + moduleName = "DUREX Vendor Control" | |
27 | + urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" | |
28 | + timestampString = "426429770.784755" | |
29 | + startingColumnNumber = "9223372036854775807" | |
30 | + endingColumnNumber = "9223372036854775807" | |
31 | + startingLineNumber = "20" | |
32 | + endingLineNumber = "20" | |
33 | + offsetFromSymbolStart = "68"> | |
34 | + </Location> | |
35 | + <Location | |
36 | + shouldBeEnabled = "Yes" | |
37 | + ignoreCount = "0" | |
38 | + continueAfterRunningActions = "No" | |
39 | + symbolName = "__39+[CommunicationProtocol sharedProtocol]_block_invoke" | |
40 | + moduleName = "DUREX Vendor Control" | |
41 | + urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" | |
42 | + timestampString = "426429770.78569" | |
43 | + startingColumnNumber = "9223372036854775807" | |
44 | + endingColumnNumber = "9223372036854775807" | |
45 | + startingLineNumber = "20" | |
46 | + endingLineNumber = "20" | |
47 | + offsetFromSymbolStart = "50"> | |
48 | + </Location> | |
49 | + </Locations> | |
50 | + </BreakpointContent> | |
51 | + </BreakpointProxy> | |
52 | + <BreakpointProxy | |
53 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
54 | + <BreakpointContent | |
55 | + shouldBeEnabled = "Yes" | |
56 | + ignoreCount = "0" | |
57 | + continueAfterRunningActions = "No" | |
58 | + filePath = "MenuTableViewController.m" | |
59 | + timestampString = "424594910.733215" | |
60 | + startingColumnNumber = "9223372036854775807" | |
61 | + endingColumnNumber = "9223372036854775807" | |
62 | + startingLineNumber = "64" | |
63 | + endingLineNumber = "64" | |
64 | + landmarkName = "-initializeMenuEntries" | |
65 | + landmarkType = "5"> | |
20 | 66 | </BreakpointContent> |
21 | 67 | </BreakpointProxy> |
22 | 68 | </Breakpoints> | ... | ... |
DUREX Vendor Control/FirstAppExample/MainStoryboard.storyboard
... | ... | @@ -78,35 +78,25 @@ |
78 | 78 | </subviews> |
79 | 79 | </tableViewCellContentView> |
80 | 80 | </tableViewCell> |
81 | - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MaintenanceCell" textLabel="C5J-Ml-IpR" style="IBUITableViewCellStyleDefault" id="tNx-4C-IjZ"> | |
81 | + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MaintenanceCell" textLabel="C5J-Ml-IpR" detailTextLabel="2Zv-NQ-q8W" style="IBUITableViewCellStyleValue1" id="tNx-4C-IjZ"> | |
82 | 82 | <rect key="frame" x="0.0" y="130" width="320" height="44"/> |
83 | 83 | <autoresizingMask key="autoresizingMask"/> |
84 | 84 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tNx-4C-IjZ" id="YyS-Ug-Lg0"> |
85 | - <rect key="frame" x="0.0" y="0.0" width="287" height="43"/> | |
85 | + <rect key="frame" x="0.0" y="0.0" width="320" height="43"/> | |
86 | 86 | <autoresizingMask key="autoresizingMask"/> |
87 | 87 | <subviews> |
88 | 88 | <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C5J-Ml-IpR"> |
89 | - <rect key="frame" x="15" y="0.0" width="270" height="43"/> | |
89 | + <rect key="frame" x="15" y="11" width="33" height="21"/> | |
90 | 90 | <autoresizingMask key="autoresizingMask"/> |
91 | - <fontDescription key="fontDescription" type="system" pointSize="18"/> | |
91 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
92 | 92 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
93 | 93 | <nil key="highlightedColor"/> |
94 | 94 | </label> |
95 | - </subviews> | |
96 | - </tableViewCellContentView> | |
97 | - </tableViewCell> | |
98 | - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="checkmark" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="StatusCell" textLabel="bl8-Dh-TBs" style="IBUITableViewCellStyleDefault" id="8hW-Im-1BJ"> | |
99 | - <rect key="frame" x="0.0" y="174" width="320" height="44"/> | |
100 | - <autoresizingMask key="autoresizingMask"/> | |
101 | - <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8hW-Im-1BJ" id="Cz1-Jy-a4L"> | |
102 | - <rect key="frame" x="0.0" y="0.0" width="281" height="43"/> | |
103 | - <autoresizingMask key="autoresizingMask"/> | |
104 | - <subviews> | |
105 | - <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bl8-Dh-TBs"> | |
106 | - <rect key="frame" x="15" y="0.0" width="266" height="43"/> | |
95 | + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2Zv-NQ-q8W"> | |
96 | + <rect key="frame" x="261" y="11" width="44" height="21"/> | |
107 | 97 | <autoresizingMask key="autoresizingMask"/> |
108 | - <fontDescription key="fontDescription" type="system" pointSize="18"/> | |
109 | - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | |
98 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
99 | + <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/> | |
110 | 100 | <nil key="highlightedColor"/> |
111 | 101 | </label> |
112 | 102 | </subviews> | ... | ... |
DUREX Vendor Control/MenuTableViewController.h
... | ... | @@ -15,9 +15,11 @@ |
15 | 15 | |
16 | 16 | #define MENU_ELEMENTS @"Maintenance",@"Basic Configuration",@"Sending a Report" |
17 | 17 | #define MENU_CELLS_PER_SECTION num(3) |
18 | +#define MENU_HEADERS nil | |
18 | 19 | |
19 | 20 | #define MAINTENANCE_ELEMENTS @"Time",@"20€ Notes",@"10€ Notes",@"5€ Notes",@"2€ Coins",@"1€ Coins",@"50c Coins",@"CPP_TABLE",@"1€ Change",@"50c Change" |
20 | -#define MAINTENANCE_CELLS_PER_SECTION num(10) | |
21 | +#define MAINTENANCE_CELLS_PER_SECTION num(10),num(0) | |
22 | +#define MAINTENANCE_HEADERS @"Status",@"Sensors" | |
21 | 23 | |
22 | 24 | #define CELL_IDENTIFIERS @"MenuCell",@"MaintenanceCell",@"ConfigCell",@"ReportCell" |
23 | 25 | |
... | ... | @@ -26,9 +28,8 @@ |
26 | 28 | enum { |
27 | 29 | MENU = 0, |
28 | 30 | MAINTENANCE, |
29 | - STATUS, | |
30 | 31 | BASIC_CONFIGURATION, |
31 | - REPORT | |
32 | + REPORT, | |
32 | 33 | } navigationLevel; |
33 | 34 | |
34 | 35 | @interface MenuTableViewController : UITableViewController | ... | ... |
DUREX Vendor Control/MenuTableViewController.m
... | ... | @@ -15,9 +15,11 @@ |
15 | 15 | } |
16 | 16 | @property (nonatomic,strong) const NSArray *menuElements; |
17 | 17 | @property (nonatomic,strong) const NSArray *menuStructure; |
18 | +@property (nonatomic,strong) const NSArray *menuHeaders; | |
18 | 19 | |
19 | 20 | @property (nonatomic,strong) const NSArray *maintenanceElements; |
20 | 21 | @property (nonatomic,strong) const NSArray *maintenanceStructure; |
22 | +@property (nonatomic,strong) const NSArray *maintenanceHeaders; | |
21 | 23 | |
22 | 24 | @property (nonatomic,strong) const NSArray *cellIdentifiers; |
23 | 25 | |
... | ... | @@ -26,6 +28,7 @@ |
26 | 28 | @property NSString *currentCellIdentifier; |
27 | 29 | @property const NSArray *currentElements; |
28 | 30 | @property const NSArray *currentStructure; |
31 | +@property const NSArray *currentHeaders; | |
29 | 32 | |
30 | 33 | @end |
31 | 34 | |
... | ... | @@ -45,9 +48,25 @@ |
45 | 48 | { |
46 | 49 | [self setMenuElements:[[NSArray alloc] initWithObjects:MENU_ELEMENTS, nil]]; |
47 | 50 | [self setMenuStructure:[[NSArray alloc] initWithObjects:MENU_CELLS_PER_SECTION, nil]]; |
51 | + if([[self menuStructure] count] > 1) | |
52 | + { | |
53 | + [self setMenuHeaders:[[NSArray alloc] initWithObjects:MENU_HEADERS, nil]]; | |
54 | + } | |
55 | + else | |
56 | + { | |
57 | + [self setMenuHeaders:nil]; | |
58 | + } | |
48 | 59 | |
49 | 60 | [self setMaintenanceElements:[[NSArray alloc] initWithObjects:MAINTENANCE_ELEMENTS, nil]]; |
50 | 61 | [self setMaintenanceStructure:[[NSArray alloc] initWithObjects:MAINTENANCE_CELLS_PER_SECTION, nil]]; |
62 | + if([[self maintenanceStructure] count] > 1) | |
63 | + { | |
64 | + [self setMaintenanceHeaders:[[NSArray alloc] initWithObjects:MAINTENANCE_HEADERS, nil]]; | |
65 | + } | |
66 | + else | |
67 | + { | |
68 | + [self setMaintenanceHeaders:nil]; | |
69 | + } | |
51 | 70 | |
52 | 71 | [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; |
53 | 72 | } |
... | ... | @@ -61,18 +80,29 @@ |
61 | 80 | { |
62 | 81 | [self setCurrentElements:[self maintenanceElements]]; |
63 | 82 | [self setCurrentStructure:[self maintenanceStructure]]; |
83 | + [self setCurrentHeaders:[self maintenanceHeaders]]; | |
64 | 84 | } |
65 | 85 | //AND SO ON... |
66 | 86 | else |
67 | 87 | { |
68 | 88 | [self setCurrentElements:[self menuElements]]; |
69 | 89 | [self setCurrentStructure:[self menuStructure]]; |
90 | + [self setCurrentHeaders:[self menuHeaders]]; | |
70 | 91 | } |
71 | - | |
72 | - NSRange range = NSMakeRange(0, [self numberOfSectionsInTableView:self.tableView]); | |
92 | + [[self tableView] reloadData]; | |
93 | + NSRange range = NSMakeRange(0, [self numberOfSectionsInTableView:[self tableView]]); | |
73 | 94 | NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range]; |
74 | - [self.tableView reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; | |
95 | + [[self tableView] reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; | |
96 | +} | |
75 | 97 | |
98 | +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section | |
99 | +{ | |
100 | + NSString *title = @""; | |
101 | + if([self currentHeaders] != nil) | |
102 | + { | |
103 | + title = [[self currentHeaders] objectAtIndex:section]; | |
104 | + } | |
105 | + return title; | |
76 | 106 | } |
77 | 107 | |
78 | 108 | - (void)viewDidLoad |
... | ... | @@ -163,10 +193,12 @@ |
163 | 193 | |
164 | 194 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath |
165 | 195 | { |
196 | + NSLog(@"Section: %ld Row: %ld",(long)[indexPath section],(long)[indexPath row]); | |
166 | 197 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
167 | 198 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
168 | 199 | if([cellName isEqualToString:@"Maintenance"]) |
169 | 200 | { |
201 | + NSLog(@"Changing to navLevel: MAINTENANCE"); | |
170 | 202 | [self changeNavLevel:MAINTENANCE]; |
171 | 203 | } |
172 | 204 | } |
... | ... | @@ -185,14 +217,41 @@ |
185 | 217 | |
186 | 218 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
187 | 219 | { |
220 | + NSLog(@"navLevel is %d",[self currentNavLevel]); | |
188 | 221 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
189 | 222 | |
190 | 223 | if (cell == nil) |
191 | 224 | { |
192 | - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[self currentCellIdentifier]]; | |
225 | + NSLog(@"Initializing cell"); | |
226 | + if([self currentNavLevel] == MAINTENANCE) | |
227 | + { | |
228 | + NSLog(@"Dispatching Maintenance-type cell"); | |
229 | + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; | |
230 | + } | |
231 | + else | |
232 | + { | |
233 | + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[self currentCellIdentifier]]; | |
234 | + } | |
235 | + } | |
236 | + uint8_t offset = 0; | |
237 | + if([indexPath section] ) | |
238 | + { | |
239 | + for (int i = 0; i < [indexPath section]; i++) | |
240 | + { | |
241 | + offset += [[[self currentStructure] objectAtIndex:i] unsignedCharValue]; | |
242 | + } | |
243 | + } | |
244 | + [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; | |
245 | + if([self currentNavLevel] == MAINTENANCE) | |
246 | + { | |
247 | + NSLog(@"Customizing cell for navLevel MAINTENANCE"); | |
248 | + [[cell detailTextLabel] setText:@"VALUE"]; | |
249 | + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; | |
250 | + if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | |
251 | + { | |
252 | + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]]; | |
253 | + } | |
193 | 254 | } |
194 | - | |
195 | - [[cell textLabel] setText:[[self currentElements] objectAtIndex:indexPath.row]]; | |
196 | 255 | return cell; |
197 | 256 | } |
198 | 257 | ... | ... |
DUREX Vendor Control/Stack.m
DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX tests/FirstAppExample/MainStoryboard.storyboard
1 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> | |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> | |
3 | 3 | <dependencies> |
4 | 4 | <deployment defaultVersion="1536" identifier="iOS"/> |
5 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/> | |
5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | |
6 | 6 | </dependencies> |
7 | 7 | <scenes> |
8 | 8 | <!--Device Picker View Controller - Select device--> |
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | </subviews> |
80 | 80 | </tableViewCellContentView> |
81 | 81 | </tableViewCell> |
82 | - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MaintenanceCell" textLabel="oML-ji-1Ho" style="IBUITableViewCellStyleDefault" id="apQ-aM-g3l"> | |
82 | + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="MaintenanceCell" textLabel="oML-ji-1Ho" detailTextLabel="Ghk-fD-iNE" style="IBUITableViewCellStyleValue1" id="apQ-aM-g3l"> | |
83 | 83 | <rect key="frame" x="0.0" y="130" width="320" height="44"/> |
84 | 84 | <autoresizingMask key="autoresizingMask"/> |
85 | 85 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="apQ-aM-g3l" id="dQQ-Yv-wa7"> |
... | ... | @@ -87,12 +87,19 @@ |
87 | 87 | <autoresizingMask key="autoresizingMask"/> |
88 | 88 | <subviews> |
89 | 89 | <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oML-ji-1Ho"> |
90 | - <rect key="frame" x="15" y="0.0" width="290" height="43"/> | |
90 | + <rect key="frame" x="15" y="11" width="33" height="21"/> | |
91 | 91 | <autoresizingMask key="autoresizingMask"/> |
92 | - <fontDescription key="fontDescription" type="system" pointSize="18"/> | |
92 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
93 | 93 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
94 | 94 | <nil key="highlightedColor"/> |
95 | 95 | </label> |
96 | + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Ghk-fD-iNE"> | |
97 | + <rect key="frame" x="261" y="11" width="44" height="21"/> | |
98 | + <autoresizingMask key="autoresizingMask"/> | |
99 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
100 | + <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/> | |
101 | + <nil key="highlightedColor"/> | |
102 | + </label> | |
96 | 103 | </subviews> |
97 | 104 | </tableViewCellContentView> |
98 | 105 | </tableViewCell> |
... | ... | @@ -175,4 +182,4 @@ |
175 | 182 | <simulatedOrientationMetrics key="orientation"/> |
176 | 183 | <simulatedScreenMetrics key="destination" type="retina4"/> |
177 | 184 | </simulatedMetricsContainer> |
178 | -</document> | |
179 | 185 | \ No newline at end of file |
186 | +</document> | ... | ... |
DUREX tests/MenuTableViewController.m
... | ... | @@ -167,6 +167,7 @@ |
167 | 167 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
168 | 168 | if([cellName isEqualToString:@"Maintenance"]) |
169 | 169 | { |
170 | + NSLog(@"Changing to navLevel: MAINTENANCE"); | |
170 | 171 | [self changeNavLevel:MAINTENANCE]; |
171 | 172 | } |
172 | 173 | |
... | ... | @@ -187,12 +188,15 @@ |
187 | 188 | |
188 | 189 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
189 | 190 | { |
191 | + NSLog(@"navLevel is %d",[self currentNavLevel]); | |
190 | 192 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
191 | 193 | |
192 | 194 | if (cell == nil) |
193 | 195 | { |
196 | + NSLog(@"Initializing cell"); | |
194 | 197 | if([self currentNavLevel] == MAINTENANCE) |
195 | 198 | { |
199 | + NSLog(@"Dispatching Maintenance-type cell"); | |
196 | 200 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; |
197 | 201 | } |
198 | 202 | else |
... | ... | @@ -211,14 +215,14 @@ |
211 | 215 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; |
212 | 216 | if([self currentNavLevel] == MAINTENANCE) |
213 | 217 | { |
218 | + NSLog(@"Customizing cell for navLevel MAINTENANCE"); | |
214 | 219 | [[cell detailTextLabel] setText:@"VALUE"]; |
215 | - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; | |
216 | - if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | |
217 | - { | |
218 | - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]]; | |
219 | - } | |
220 | + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; | |
221 | + if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | |
222 | + { | |
223 | + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]]; | |
224 | + } | |
220 | 225 | } |
221 | - | |
222 | 226 | return cell; |
223 | 227 | } |
224 | 228 | ... | ... |