Commit f0c0dcaa6cce0fbd85ae9ff9607659735671906e

Authored by Imanol-Mikel Barba Sabariego
1 parent 93e76289

--no commit message

DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj
@@ -382,6 +382,7 @@ @@ -382,6 +382,7 @@
382 CLANG_WARN_INT_CONVERSION = YES; 382 CLANG_WARN_INT_CONVERSION = YES;
383 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
384 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 384 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  385 + CODE_SIGN_IDENTITY = "iPhone Developer";
385 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386 COPY_PHASE_STRIP = NO; 387 COPY_PHASE_STRIP = NO;
387 GCC_C_LANGUAGE_STANDARD = gnu99; 388 GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -421,6 +422,7 @@ @@ -421,6 +422,7 @@
421 CLANG_WARN_INT_CONVERSION = YES; 422 CLANG_WARN_INT_CONVERSION = YES;
422 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 423 CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
423 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 424 CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  425 + CODE_SIGN_IDENTITY = "iPhone Developer";
424 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 426 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
425 COPY_PHASE_STRIP = YES; 427 COPY_PHASE_STRIP = YES;
426 ENABLE_NS_ASSERTIONS = NO; 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,6 +17,52 @@
17 endingLineNumber = "20" 17 endingLineNumber = "20"
18 landmarkName = "+sharedProtocol" 18 landmarkName = "+sharedProtocol"
19 landmarkType = "5"> 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 </BreakpointContent> 66 </BreakpointContent>
21 </BreakpointProxy> 67 </BreakpointProxy>
22 </Breakpoints> 68 </Breakpoints>
DUREX Vendor Control/FirstAppExample/MainStoryboard.storyboard
@@ -78,35 +78,25 @@ @@ -78,35 +78,25 @@
78 </subviews> 78 </subviews>
79 </tableViewCellContentView> 79 </tableViewCellContentView>
80 </tableViewCell> 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 <rect key="frame" x="0.0" y="130" width="320" height="44"/> 82 <rect key="frame" x="0.0" y="130" width="320" height="44"/>
83 <autoresizingMask key="autoresizingMask"/> 83 <autoresizingMask key="autoresizingMask"/>
84 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tNx-4C-IjZ" id="YyS-Ug-Lg0"> 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 <autoresizingMask key="autoresizingMask"/> 86 <autoresizingMask key="autoresizingMask"/>
87 <subviews> 87 <subviews>
88 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C5J-Ml-IpR"> 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 <autoresizingMask key="autoresizingMask"/> 90 <autoresizingMask key="autoresizingMask"/>
91 - <fontDescription key="fontDescription" type="system" pointSize="18"/> 91 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
92 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> 92 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
93 <nil key="highlightedColor"/> 93 <nil key="highlightedColor"/>
94 </label> 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 <autoresizingMask key="autoresizingMask"/> 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 <nil key="highlightedColor"/> 100 <nil key="highlightedColor"/>
111 </label> 101 </label>
112 </subviews> 102 </subviews>
DUREX Vendor Control/MenuTableViewController.h
@@ -15,9 +15,11 @@ @@ -15,9 +15,11 @@
15 15
16 #define MENU_ELEMENTS @"Maintenance",@"Basic Configuration",@"Sending a Report" 16 #define MENU_ELEMENTS @"Maintenance",@"Basic Configuration",@"Sending a Report"
17 #define MENU_CELLS_PER_SECTION num(3) 17 #define MENU_CELLS_PER_SECTION num(3)
  18 +#define MENU_HEADERS nil
18 19
19 #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_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 #define CELL_IDENTIFIERS @"MenuCell",@"MaintenanceCell",@"ConfigCell",@"ReportCell" 24 #define CELL_IDENTIFIERS @"MenuCell",@"MaintenanceCell",@"ConfigCell",@"ReportCell"
23 25
@@ -26,9 +28,8 @@ @@ -26,9 +28,8 @@
26 enum { 28 enum {
27 MENU = 0, 29 MENU = 0,
28 MAINTENANCE, 30 MAINTENANCE,
29 - STATUS,  
30 BASIC_CONFIGURATION, 31 BASIC_CONFIGURATION,
31 - REPORT 32 + REPORT,
32 } navigationLevel; 33 } navigationLevel;
33 34
34 @interface MenuTableViewController : UITableViewController 35 @interface MenuTableViewController : UITableViewController
DUREX Vendor Control/MenuTableViewController.m
@@ -15,9 +15,11 @@ @@ -15,9 +15,11 @@
15 } 15 }
16 @property (nonatomic,strong) const NSArray *menuElements; 16 @property (nonatomic,strong) const NSArray *menuElements;
17 @property (nonatomic,strong) const NSArray *menuStructure; 17 @property (nonatomic,strong) const NSArray *menuStructure;
  18 +@property (nonatomic,strong) const NSArray *menuHeaders;
18 19
19 @property (nonatomic,strong) const NSArray *maintenanceElements; 20 @property (nonatomic,strong) const NSArray *maintenanceElements;
20 @property (nonatomic,strong) const NSArray *maintenanceStructure; 21 @property (nonatomic,strong) const NSArray *maintenanceStructure;
  22 +@property (nonatomic,strong) const NSArray *maintenanceHeaders;
21 23
22 @property (nonatomic,strong) const NSArray *cellIdentifiers; 24 @property (nonatomic,strong) const NSArray *cellIdentifiers;
23 25
@@ -26,6 +28,7 @@ @@ -26,6 +28,7 @@
26 @property NSString *currentCellIdentifier; 28 @property NSString *currentCellIdentifier;
27 @property const NSArray *currentElements; 29 @property const NSArray *currentElements;
28 @property const NSArray *currentStructure; 30 @property const NSArray *currentStructure;
  31 +@property const NSArray *currentHeaders;
29 32
30 @end 33 @end
31 34
@@ -45,9 +48,25 @@ @@ -45,9 +48,25 @@
45 { 48 {
46 [self setMenuElements:[[NSArray alloc] initWithObjects:MENU_ELEMENTS, nil]]; 49 [self setMenuElements:[[NSArray alloc] initWithObjects:MENU_ELEMENTS, nil]];
47 [self setMenuStructure:[[NSArray alloc] initWithObjects:MENU_CELLS_PER_SECTION, nil]]; 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 [self setMaintenanceElements:[[NSArray alloc] initWithObjects:MAINTENANCE_ELEMENTS, nil]]; 60 [self setMaintenanceElements:[[NSArray alloc] initWithObjects:MAINTENANCE_ELEMENTS, nil]];
50 [self setMaintenanceStructure:[[NSArray alloc] initWithObjects:MAINTENANCE_CELLS_PER_SECTION, nil]]; 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 [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; 71 [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]];
53 } 72 }
@@ -61,18 +80,29 @@ @@ -61,18 +80,29 @@
61 { 80 {
62 [self setCurrentElements:[self maintenanceElements]]; 81 [self setCurrentElements:[self maintenanceElements]];
63 [self setCurrentStructure:[self maintenanceStructure]]; 82 [self setCurrentStructure:[self maintenanceStructure]];
  83 + [self setCurrentHeaders:[self maintenanceHeaders]];
64 } 84 }
65 //AND SO ON... 85 //AND SO ON...
66 else 86 else
67 { 87 {
68 [self setCurrentElements:[self menuElements]]; 88 [self setCurrentElements:[self menuElements]];
69 [self setCurrentStructure:[self menuStructure]]; 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 NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range]; 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 - (void)viewDidLoad 108 - (void)viewDidLoad
@@ -163,10 +193,12 @@ @@ -163,10 +193,12 @@
163 193
164 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 194 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
165 { 195 {
  196 + NSLog(@"Section: %ld Row: %ld",(long)[indexPath section],(long)[indexPath row]);
166 [tableView deselectRowAtIndexPath:indexPath animated:YES]; 197 [tableView deselectRowAtIndexPath:indexPath animated:YES];
167 NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; 198 NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text];
168 if([cellName isEqualToString:@"Maintenance"]) 199 if([cellName isEqualToString:@"Maintenance"])
169 { 200 {
  201 + NSLog(@"Changing to navLevel: MAINTENANCE");
170 [self changeNavLevel:MAINTENANCE]; 202 [self changeNavLevel:MAINTENANCE];
171 } 203 }
172 } 204 }
@@ -185,14 +217,41 @@ @@ -185,14 +217,41 @@
185 217
186 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 218 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
187 { 219 {
  220 + NSLog(@"navLevel is %d",[self currentNavLevel]);
188 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; 221 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath];
189 222
190 if (cell == nil) 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 return cell; 255 return cell;
197 } 256 }
198 257
DUREX Vendor Control/Stack.m
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 - (void) push: (id) element 27 - (void) push: (id) element
28 { 28 {
29 [[self dataArray] addObject:element]; 29 [[self dataArray] addObject:element];
30 - printf("%d elements in array\n",[self count]); 30 + printf("%ld elements in array\n",(long)[self count]);
31 } 31 }
32 - (id) pop 32 - (id) pop
33 { 33 {
DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX tests/FirstAppExample/MainStoryboard.storyboard
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 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 <dependencies> 3 <dependencies>
4 <deployment defaultVersion="1536" identifier="iOS"/> 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 </dependencies> 6 </dependencies>
7 <scenes> 7 <scenes>
8 <!--Device Picker View Controller - Select device--> 8 <!--Device Picker View Controller - Select device-->
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 </subviews> 79 </subviews>
80 </tableViewCellContentView> 80 </tableViewCellContentView>
81 </tableViewCell> 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 <rect key="frame" x="0.0" y="130" width="320" height="44"/> 83 <rect key="frame" x="0.0" y="130" width="320" height="44"/>
84 <autoresizingMask key="autoresizingMask"/> 84 <autoresizingMask key="autoresizingMask"/>
85 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="apQ-aM-g3l" id="dQQ-Yv-wa7"> 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,12 +87,19 @@
87 <autoresizingMask key="autoresizingMask"/> 87 <autoresizingMask key="autoresizingMask"/>
88 <subviews> 88 <subviews>
89 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oML-ji-1Ho"> 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 <autoresizingMask key="autoresizingMask"/> 91 <autoresizingMask key="autoresizingMask"/>
92 - <fontDescription key="fontDescription" type="system" pointSize="18"/> 92 + <fontDescription key="fontDescription" type="system" pointSize="17"/>
93 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> 93 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
94 <nil key="highlightedColor"/> 94 <nil key="highlightedColor"/>
95 </label> 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 </subviews> 103 </subviews>
97 </tableViewCellContentView> 104 </tableViewCellContentView>
98 </tableViewCell> 105 </tableViewCell>
@@ -175,4 +182,4 @@ @@ -175,4 +182,4 @@
175 <simulatedOrientationMetrics key="orientation"/> 182 <simulatedOrientationMetrics key="orientation"/>
176 <simulatedScreenMetrics key="destination" type="retina4"/> 183 <simulatedScreenMetrics key="destination" type="retina4"/>
177 </simulatedMetricsContainer> 184 </simulatedMetricsContainer>
178 -</document>  
179 \ No newline at end of file 185 \ No newline at end of file
  186 +</document>
DUREX tests/MenuTableViewController.m
@@ -167,6 +167,7 @@ @@ -167,6 +167,7 @@
167 NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; 167 NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text];
168 if([cellName isEqualToString:@"Maintenance"]) 168 if([cellName isEqualToString:@"Maintenance"])
169 { 169 {
  170 + NSLog(@"Changing to navLevel: MAINTENANCE");
170 [self changeNavLevel:MAINTENANCE]; 171 [self changeNavLevel:MAINTENANCE];
171 } 172 }
172 173
@@ -187,12 +188,15 @@ @@ -187,12 +188,15 @@
187 188
188 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 189 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
189 { 190 {
  191 + NSLog(@"navLevel is %d",[self currentNavLevel]);
190 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; 192 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath];
191 193
192 if (cell == nil) 194 if (cell == nil)
193 { 195 {
  196 + NSLog(@"Initializing cell");
194 if([self currentNavLevel] == MAINTENANCE) 197 if([self currentNavLevel] == MAINTENANCE)
195 { 198 {
  199 + NSLog(@"Dispatching Maintenance-type cell");
196 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; 200 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]];
197 } 201 }
198 else 202 else
@@ -211,14 +215,14 @@ @@ -211,14 +215,14 @@
211 [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; 215 [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]];
212 if([self currentNavLevel] == MAINTENANCE) 216 if([self currentNavLevel] == MAINTENANCE)
213 { 217 {
  218 + NSLog(@"Customizing cell for navLevel MAINTENANCE");
214 [[cell detailTextLabel] setText:@"VALUE"]; 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 return cell; 226 return cell;
223 } 227 }
224 228
1 --Implement sensors and status options  
2 --Maintenance UITableViewCell with 2 UILabels 1 +-Implement sensors options
3 -Make changes to DUREX Vendor Control Project 2 -Make changes to DUREX Vendor Control Project
4 -Implement Navigation Controller 3 -Implement Navigation Controller
5 -Implement table inside UITableViewCell 4 -Implement table inside UITableViewCell