Commit c0a50a771c898e87f280c961ed91f32dc56bfcc4

Authored by Imanol-Mikel Barba Sabariego
1 parent f150b8ed

--no commit message

DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard
... ... @@ -142,18 +142,22 @@
142 142 <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
143 143 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
144 144 <subviews>
145   - <button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt">
146   - <rect key="frame" x="96" y="161" width="128" height="128"/>
  145 + <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt">
  146 + <rect key="frame" x="96" y="220" width="128" height="128"/>
147 147 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
148   - <state key="normal" backgroundImage="bluetooth.png">
  148 + <constraints>
  149 + <constraint firstAttribute="height" constant="128" id="6dT-iW-SSO"/>
  150 + <constraint firstAttribute="width" constant="128" id="kf5-YV-3Sh"/>
  151 + </constraints>
  152 + <state key="normal" image="bluetooth.png">
149 153 <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
150 154 </state>
151 155 <connections>
152 156 <action selector="connectPressed:" destination="fM1-5w-fRr" eventType="touchDown" id="yhT-cP-LLA"/>
153 157 </connections>
154 158 </button>
155   - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Connect to Device" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oyW-sA-Lfb">
156   - <rect key="frame" x="86" y="297" width="149" height="21"/>
  159 + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Connect to Device" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oyW-sA-Lfb">
  160 + <rect key="frame" x="86" y="356" width="149" height="21"/>
157 161 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
158 162 <fontDescription key="fontDescription" type="system" pointSize="17"/>
159 163 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
... ... @@ -161,6 +165,12 @@
161 165 </label>
162 166 </subviews>
163 167 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  168 + <constraints>
  169 + <constraint firstAttribute="centerX" secondItem="bXZ-vt-REt" secondAttribute="centerX" id="Uyn-2O-ccf"/>
  170 + <constraint firstItem="bXZ-vt-REt" firstAttribute="centerX" secondItem="oyW-sA-Lfb" secondAttribute="centerX" constant="-0.5" id="V2s-h0-oJw"/>
  171 + <constraint firstAttribute="centerY" secondItem="bXZ-vt-REt" secondAttribute="centerY" id="hcc-LE-6Fa"/>
  172 + <constraint firstItem="oyW-sA-Lfb" firstAttribute="top" secondItem="bXZ-vt-REt" secondAttribute="bottom" constant="8" id="o4R-UP-78W"/>
  173 + </constraints>
164 174 </view>
165 175 <navigationItem key="navigationItem" id="VgB-ne-yWx"/>
166 176 <connections>
... ...
DUREX Vendor Control/MenuTableViewController.m
... ... @@ -283,11 +283,21 @@
283 283 [[cell textLabel] setText:NSLocalizedString([[self currentElements] objectAtIndex:[indexPath row]+offset],nil)];
284 284 if([self currentNavLevel] == MAINTENANCE)
285 285 {
286   - [[cell detailTextLabel] setText:@"VALUE"];
287   - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]];
288   - if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"CH4 presence",nil)])
  286 + if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Sales log",nil)] || [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Incident report",nil)] || [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Send report",nil)])
289 287 {
290   - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]];
  288 + [[cell detailTextLabel] setText:@""];
  289 + [cell setAccessoryView:nil];
  290 + [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
  291 + }
  292 + else
  293 + {
  294 + [[cell detailTextLabel] setText:@"VALUE"];
  295 + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]];
  296 + if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"CH4 presence",nil)])
  297 + {
  298 + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]];
  299 + }
  300 +
291 301 }
292 302 }
293 303 return cell;
... ...
DUREX tests/Base.lproj/MainStoryboard.storyboard
... ... @@ -142,18 +142,22 @@
142 142 <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
143 143 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
144 144 <subviews>
145   - <button opaque="NO" contentMode="scaleAspectFit" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt">
146   - <rect key="frame" x="96" y="137" width="128" height="128"/>
  145 + <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt">
  146 + <rect key="frame" x="96" y="220" width="128" height="128"/>
147 147 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
148   - <state key="normal" backgroundImage="bluetooth.png">
  148 + <constraints>
  149 + <constraint firstAttribute="height" constant="128" id="QBQ-Yi-qQR"/>
  150 + <constraint firstAttribute="width" constant="128" id="a1L-HP-VFv"/>
  151 + </constraints>
  152 + <state key="normal" image="bluetooth.png">
149 153 <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
150 154 </state>
151 155 <connections>
152 156 <action selector="connectPressed:" destination="fM1-5w-fRr" eventType="touchDown" id="yhT-cP-LLA"/>
153 157 </connections>
154 158 </button>
155   - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Connect to device" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="143" translatesAutoresizingMaskIntoConstraints="NO" id="oyW-sA-Lfb">
156   - <rect key="frame" x="89" y="273" width="143" height="21"/>
  159 + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Connect to device" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oyW-sA-Lfb">
  160 + <rect key="frame" x="89" y="356" width="143" height="21"/>
157 161 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
158 162 <fontDescription key="fontDescription" type="system" pointSize="17"/>
159 163 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
... ... @@ -161,6 +165,12 @@
161 165 </label>
162 166 </subviews>
163 167 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  168 + <constraints>
  169 + <constraint firstItem="oyW-sA-Lfb" firstAttribute="top" secondItem="bXZ-vt-REt" secondAttribute="bottom" constant="8" id="4cZ-A3-dtl"/>
  170 + <constraint firstAttribute="centerY" secondItem="bXZ-vt-REt" secondAttribute="centerY" id="iX3-rf-HXs"/>
  171 + <constraint firstAttribute="centerX" secondItem="bXZ-vt-REt" secondAttribute="centerX" id="o5J-8O-TzK"/>
  172 + <constraint firstItem="oyW-sA-Lfb" firstAttribute="centerX" secondItem="bXZ-vt-REt" secondAttribute="centerX" constant="0.5" id="ruI-SS-9Bo"/>
  173 + </constraints>
164 174 </view>
165 175 <navigationItem key="navigationItem" id="VgB-ne-yWx"/>
166 176 <connections>
... ...
DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX tests/MenuTableViewController.m
... ... @@ -256,11 +256,21 @@
256 256 [[cell textLabel] setText:NSLocalizedString([[self currentElements] objectAtIndex:[indexPath row]+offset],nil)];
257 257 if([self currentNavLevel] == MAINTENANCE)
258 258 {
259   - [[cell detailTextLabel] setText:@"VALUE"];
260   - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]];
261   - if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"CH4 presence",nil)])
  259 + if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Sales log",nil)] || [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Incident report",nil)] || [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"Send report",nil)])
262 260 {
263   - [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]];
  261 + [[cell detailTextLabel] setText:@""];
  262 + [cell setAccessoryView:nil];
  263 + [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
  264 + }
  265 + else
  266 + {
  267 + [[cell detailTextLabel] setText:@"VALUE"];
  268 + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]];
  269 + if( [[[cell textLabel] text] isEqualToString:NSLocalizedString(@"CH4 presence",nil)])
  270 + {
  271 + [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_delete"]]];
  272 + }
  273 +
264 274 }
265 275 }
266 276 return cell;
... ...