UI和灯号调整
This commit is contained in:
parent
7801e35aae
commit
e2faf52575
|
|
@ -2301,6 +2301,9 @@
|
|||
C038964E284332040073E88F /* ElectricityView.h in Headers */ = {isa = PBXBuildFile; fileRef = C038964C284332040073E88F /* ElectricityView.h */; };
|
||||
C038964F284332040073E88F /* ElectricityView.m in Sources */ = {isa = PBXBuildFile; fileRef = C038964D284332040073E88F /* ElectricityView.m */; };
|
||||
C0389651284332170073E88F /* ElectricityView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0389650284332170073E88F /* ElectricityView.xib */; };
|
||||
C0553C2628856DBD00AB7B50 /* topround.png in Resources */ = {isa = PBXBuildFile; fileRef = C0553C2428856DBC00AB7B50 /* topround.png */; };
|
||||
C0553C2728856DBD00AB7B50 /* bottomRound.png in Resources */ = {isa = PBXBuildFile; fileRef = C0553C2528856DBD00AB7B50 /* bottomRound.png */; };
|
||||
C0553C292885962B00AB7B50 /* centerrect.png in Resources */ = {isa = PBXBuildFile; fileRef = C0553C282885962A00AB7B50 /* centerrect.png */; };
|
||||
C057166C282376CC004F113A /* UIButton+ImageTitleStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = C057166A282376CC004F113A /* UIButton+ImageTitleStyle.h */; };
|
||||
C057166D282376CC004F113A /* UIButton+ImageTitleStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = C057166B282376CC004F113A /* UIButton+ImageTitleStyle.m */; };
|
||||
C05716702823D653004F113A /* XuanduoTimerListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C057166E2823D652004F113A /* XuanduoTimerListViewController.h */; };
|
||||
|
|
@ -5817,6 +5820,9 @@
|
|||
C038964C284332040073E88F /* ElectricityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ElectricityView.h; sourceTree = "<group>"; };
|
||||
C038964D284332040073E88F /* ElectricityView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ElectricityView.m; sourceTree = "<group>"; };
|
||||
C0389650284332170073E88F /* ElectricityView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ElectricityView.xib; sourceTree = "<group>"; };
|
||||
C0553C2428856DBC00AB7B50 /* topround.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = topround.png; sourceTree = "<group>"; };
|
||||
C0553C2528856DBD00AB7B50 /* bottomRound.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bottomRound.png; sourceTree = "<group>"; };
|
||||
C0553C282885962A00AB7B50 /* centerrect.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = centerrect.png; sourceTree = "<group>"; };
|
||||
C057166A282376CC004F113A /* UIButton+ImageTitleStyle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIButton+ImageTitleStyle.h"; sourceTree = "<group>"; };
|
||||
C057166B282376CC004F113A /* UIButton+ImageTitleStyle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIButton+ImageTitleStyle.m"; sourceTree = "<group>"; };
|
||||
C057166E2823D652004F113A /* XuanduoTimerListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XuanduoTimerListViewController.h; sourceTree = "<group>"; };
|
||||
|
|
@ -9059,7 +9065,10 @@
|
|||
FA08931D2275FCF10084A609 /* light_big@2x.png */,
|
||||
FA0893092275DD770084A609 /* shajun_big@2x.png */,
|
||||
882955A11DBDA3A100E9DDD7 /* secondSetCell.png */,
|
||||
C0553C2528856DBD00AB7B50 /* bottomRound.png */,
|
||||
C0553C2428856DBC00AB7B50 /* topround.png */,
|
||||
882955A21DBDA3A100E9DDD7 /* set_cellBack.png */,
|
||||
C0553C282885962A00AB7B50 /* centerrect.png */,
|
||||
C01B988A282F802E004FF42D /* arrow_right@2x.png */,
|
||||
C08976AD282117920098B5FA /* 矩形.png */,
|
||||
C08976AE282117920098B5FA /* 矩形@2x.png */,
|
||||
|
|
@ -13768,6 +13777,7 @@
|
|||
8871FAF61EBC62FA0038E99A /* attestation_next_button@3x.png in Resources */,
|
||||
882958131DC04ED200E9DDD7 /* equipment_background@3x.png in Resources */,
|
||||
8871C4A11E6D507B000AA49F /* signin_condition_gift_achieve@3x.png in Resources */,
|
||||
C0553C292885962B00AB7B50 /* centerrect.png in Resources */,
|
||||
882956EA1DBDA3A300E9DDD7 /* ifish_yoosee_device.png in Resources */,
|
||||
8832833A1EAEE60500A47157 /* ifish_discovery_off@2x.png in Resources */,
|
||||
886CB95D1E63F35C00BCB892 /* home_iocn_signin@3x.png in Resources */,
|
||||
|
|
@ -14756,12 +14766,14 @@
|
|||
8829566C1DBDA3A200E9DDD7 /* shop_certifycheck.png in Resources */,
|
||||
8871FB111EBC80850038E99A /* FishSelectDeviceListViewCell.xib in Resources */,
|
||||
886CB95B1E63F35C00BCB892 /* home_iocn_signin.png in Resources */,
|
||||
C0553C2628856DBD00AB7B50 /* topround.png in Resources */,
|
||||
8891332C1ECE99B900F52EBC /* recording_iocn_over@2x.png in Resources */,
|
||||
885FBE131E4D66C000E0D7D1 /* merchant_iocn_a_attestation.png in Resources */,
|
||||
8871FB1C1EBC822B0038E99A /* select_aquarium@2x.png in Resources */,
|
||||
885FBE301E4DAB4500E0D7D1 /* merchant_iocn_shop@3x.png in Resources */,
|
||||
88F23F2C1EA9D18700E4D298 /* live_botton_uncheck_like@3x.png in Resources */,
|
||||
8853D99B1E24EED700776BF4 /* ShuoMingShuCell.xib in Resources */,
|
||||
C0553C2728856DBD00AB7B50 /* bottomRound.png in Resources */,
|
||||
FAFC08252279CB5900B5A07B /* SetTimerCell.xib in Resources */,
|
||||
882956031DBDA3A100E9DDD7 /* neves0006.png in Resources */,
|
||||
88C1B2111DCC5A1400C2C99A /* personal_iocn_about.png in Resources */,
|
||||
|
|
@ -16013,7 +16025,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
@ -16132,7 +16144,7 @@
|
|||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PlusTableViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *addTimerBtn;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -16,11 +14,11 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="79.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ifishSetCell_back.png" translatesAutoresizingMaskIntoConstraints="NO" id="Hc6-I7-yDU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="79.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6h6-2g-eDK">
|
||||
<rect key="frame" x="137" y="17" width="46" height="46"/>
|
||||
|
|
@ -44,12 +42,13 @@
|
|||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="addTimerBtn" destination="6h6-2g-eDK" id="Jsg-om-i4G"/>
|
||||
<outlet property="backImageView" destination="Hc6-I7-yDU" id="yB6-1d-Rrx"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="52.799999999999997" y="149.32533733133434"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="add.png" width="46" height="46"/>
|
||||
<image name="add.png" width="46.5" height="46.5"/>
|
||||
<image name="ifishSetCell_back.png" width="1080" height="140"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@interface SetTimerCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *switchBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timerLabel;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,13 @@
|
|||
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ifishSetCell_back.png" translatesAutoresizingMaskIntoConstraints="NO" id="P3o-KY-LIT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AW2-Ki-aud" userLabel="lineView">
|
||||
<rect key="frame" x="0.0" y="49.5" width="320" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.25490196078431371" green="0.25490196078431371" blue="0.25490196078431371" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="Kkl-9d-H0c"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="时段1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yY6-WX-OcS">
|
||||
<rect key="frame" x="28" y="17" width="33" height="16"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
|
|
@ -47,19 +54,24 @@
|
|||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="P3o-KY-LIT" secondAttribute="trailing" id="2yN-ro-gmU"/>
|
||||
<constraint firstItem="AW2-Ki-aud" firstAttribute="width" secondItem="P3o-KY-LIT" secondAttribute="width" id="7Df-NX-Hzi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SDK-gA-raP" secondAttribute="trailing" constant="28" id="7Ux-nN-8iv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="P3o-KY-LIT" secondAttribute="bottom" id="8Bd-g4-FLv"/>
|
||||
<constraint firstItem="AW2-Ki-aud" firstAttribute="leading" secondItem="P3o-KY-LIT" secondAttribute="leading" id="KEg-pL-yYb"/>
|
||||
<constraint firstItem="P3o-KY-LIT" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="LcH-qx-fyJ"/>
|
||||
<constraint firstItem="P3o-KY-LIT" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="N6V-Tp-Fcx"/>
|
||||
<constraint firstItem="hQu-ZP-ugr" firstAttribute="centerY" secondItem="yY6-WX-OcS" secondAttribute="centerY" id="ZaA-96-fkI"/>
|
||||
<constraint firstItem="hQu-ZP-ugr" firstAttribute="leading" secondItem="yY6-WX-OcS" secondAttribute="trailing" constant="55" id="c5H-Ak-EAF"/>
|
||||
<constraint firstItem="yY6-WX-OcS" firstAttribute="centerY" secondItem="P3o-KY-LIT" secondAttribute="centerY" id="eLH-LS-Vwj"/>
|
||||
<constraint firstItem="yY6-WX-OcS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="28" id="fi0-nJ-8jg"/>
|
||||
<constraint firstItem="AW2-Ki-aud" firstAttribute="trailing" secondItem="P3o-KY-LIT" secondAttribute="trailing" id="hxt-iT-Vua"/>
|
||||
<constraint firstItem="AW2-Ki-aud" firstAttribute="bottom" secondItem="P3o-KY-LIT" secondAttribute="bottom" id="sWC-ae-JdY"/>
|
||||
<constraint firstItem="SDK-gA-raP" firstAttribute="centerY" secondItem="hQu-ZP-ugr" secondAttribute="centerY" id="seY-SG-N35"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="backImageView" destination="P3o-KY-LIT" id="ySC-6s-HgO"/>
|
||||
<outlet property="switchBtn" destination="SDK-gA-raP" id="EzJ-PP-FfH"/>
|
||||
<outlet property="timerLabel" destination="hQu-ZP-ugr" id="vDu-mo-su7"/>
|
||||
<outlet property="titleLabel" destination="yY6-WX-OcS" id="KDa-OR-dyK"/>
|
||||
|
|
|
|||
|
|
@ -235,12 +235,14 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
|
|||
BOOL havePlus = [dataArr containsObject:plusflag];
|
||||
if (havePlus && (indexPath.row == dataArr.count-1)) {
|
||||
PlusTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:addCellid forIndexPath:indexPath];
|
||||
cell.backImageView.image = [UIImage imageNamed:@"bottomRound"];
|
||||
cell.addTimerBtn.tag = kBtnTag + indexPath.section;
|
||||
[cell.addTimerBtn addTarget:self action:@selector(addTimer:) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
|
||||
}else {
|
||||
SetTimerCell *cell = [tableView dequeueReusableCellWithIdentifier:setTimerflag forIndexPath:indexPath];
|
||||
cell.backImageView.image = [UIImage imageNamed:@"centerrect"];
|
||||
cell.switchBtn.tag = kSwitchBtnTag + indexPath.row;
|
||||
[cell.switchBtn addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
XuanduoTimerGroup *group = [dataArr objectAtIndex:havePlus?indexPath.row+1:indexPath.row];
|
||||
|
|
@ -312,12 +314,14 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
|
|||
BOOL havePlus = [dataArr containsObject:plusflag];
|
||||
if (havePlus && (indexPath.row == dataArr.count-1)) {
|
||||
PlusTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:addCellid forIndexPath:indexPath];
|
||||
cell.backImageView.image = [UIImage imageNamed:@"bottomRound"];
|
||||
cell.addTimerBtn.tag = kBtnTag + indexPath.section;
|
||||
[cell.addTimerBtn addTarget:self action:@selector(addTimer:) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
|
||||
}else {
|
||||
SetTimerCell *cell = [tableView dequeueReusableCellWithIdentifier:setTimerflag forIndexPath:indexPath];
|
||||
cell.backImageView.image = [UIImage imageNamed:@"centerrect"];
|
||||
cell.switchBtn.tag = kSwitchBtnTag + indexPath.row;
|
||||
[cell.switchBtn addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
XuanduoTimerGroup *group = [dataArr objectAtIndex:havePlus?indexPath.row+1:indexPath.row];
|
||||
|
|
@ -384,7 +388,7 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
|
|||
height=section==0?50:40;
|
||||
UIImageView*imageView=[[UIImageView alloc]init];
|
||||
imageView.frame=CGRectMake(0, 0, self.tableView.frame.size.width, height);
|
||||
imageView.image=[UIImage imageNamed:@"set_cellBack"];
|
||||
imageView.image=[UIImage imageNamed:@"topround"];
|
||||
UILabel*label=[[UILabel alloc]initWithFrame:CGRectMake(15, 0, self.tableView.frame.size.width-20, height)];
|
||||
label.text=_titieArr[section];
|
||||
label.textColor=[UIColor blackColor];
|
||||
|
|
@ -1066,53 +1070,7 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
|
|||
BOOL havePlus = [dataArr containsObject:plusflag];
|
||||
XuanduoTimerGroup *group = [dataArr objectAtIndex:(havePlus?_indexPath.row+1:_indexPath.row)];
|
||||
timerModel.groupNumber = [dataContorl groupNumberTohex:group.groupNumber.integerValue];
|
||||
switch (index) {
|
||||
case 0: //循环泵
|
||||
{
|
||||
timerModel.selectorNumber = @"04";
|
||||
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
|
||||
{
|
||||
timerModel.selectorNumber=@"01";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1: //增氧
|
||||
{
|
||||
timerModel.selectorNumber = @"01";
|
||||
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
|
||||
{
|
||||
timerModel.selectorNumber=@"02";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: //灯光1
|
||||
{
|
||||
timerModel.selectorNumber = @"02";
|
||||
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
|
||||
{
|
||||
timerModel.selectorNumber=@"03";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3: //灯光2
|
||||
{
|
||||
timerModel.selectorNumber = @"03";
|
||||
}
|
||||
break;
|
||||
case 4: //造浪泵
|
||||
{
|
||||
timerModel.selectorNumber = @"06";
|
||||
}
|
||||
break;
|
||||
case 5: //杀菌灯
|
||||
{
|
||||
timerModel.selectorNumber = @"05";
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
timerModel.selectorNumber=self.lightNumber;
|
||||
NSString*selectorString=[NSString stringWithFormat:@"%@%@%@%@%@%@",timerModel.description,timerModel.selectorNumber,timerModel.groupNumber,timerModel.isOn,timerModel.selectorTime,timerModel.crc16str];
|
||||
|
||||
NSData*selctorData=[dataContorl stringToHexData:selectorString];
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in New Issue