features:4月新绚多设备适配 & 修复一些已知bug

This commit is contained in:
一只会编程的狮子
2019-05-15 20:24:53 +08:00
parent 4b74588759
commit c586949438
59 changed files with 2912 additions and 130 deletions
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "deletebtn_bg@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "surebtn_bg.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

+2 -2
View File
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.9.3</string>
<string>4.9.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>9.7</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
+2 -1
View File
@@ -14,7 +14,8 @@
+(NSString *)hexStringFromString:(NSString *)string;
+(NSString *)ToHex:(long long int)tmpid;
+(UInt64)hexToTen:(NSString*)str;
+ (NSString *)stringFromHexString:(NSString *)hexString;
+(NSString *)groupNumberTohex:(NSInteger)number;
+(NSString *)stringFromHexString:(NSString *)hexString;
+(NSString*)dateStringToHexString:(NSString *)dateString;
+(NSString*)tpIntStringToFourHex:(int)intString;
+(NSString*)hexStringToDateString:(NSString*)hexString;
+65
View File
@@ -109,6 +109,50 @@
}
return str;
}
/// 1 - 10组
+(NSString *)groupNumberTohex:(NSInteger)number{
NSString *str = @"";
switch (number) {
case 0:
str = @"00";
break;
case 1:
str = @"01";
break;
case 2:
str = @"02";
break;
case 3:
str = @"03";
break;
case 4:
str = @"04";
break;
case 5:
str = @"05";
break;
case 6:
str = @"06";
break;
case 7:
str = @"07";
break;
case 8:
str = @"08";
break;
case 9:
str = @"09";
break;
case 10:
str = @"0a";
break;
default:
break;
}
return str;
}
// 十六转十
+(UInt64)hexToTen:(NSString*)str{
// unsigned long long result = 0;
@@ -214,6 +258,27 @@
UInt64 shi =strtoul([[hexString substringWithRange:NSMakeRange(0, 2)] UTF8String], 0, 16);
shiString=[NSString stringWithFormat:@"%llu",shi];
if ([shiString isEqualToString:@"0"]) {
shiString = @"00";
}else if ([shiString isEqualToString:@"1"]){
shiString = @"01";
}else if ([shiString isEqualToString:@"2"]){
shiString = @"02";
}else if ([shiString isEqualToString:@"3"]){
shiString = @"03";
}else if ([shiString isEqualToString:@"4"]){
shiString = @"04";
}else if ([shiString isEqualToString:@"5"]){
shiString = @"05";
}else if ([shiString isEqualToString:@"6"]){
shiString = @"06";
}else if ([shiString isEqualToString:@"7"]){
shiString = @"07";
}else if ([shiString isEqualToString:@"8"]){
shiString = @"08";
}else if ([shiString isEqualToString:@"9"]){
shiString = @"09";
}
// NSLog(@"str2 %@",shiString);
@@ -28,7 +28,7 @@
CGFloat imgWid= kScreenSize.width - 40*2;
CGFloat imHeight= imgWid*1.6;
CGFloat imHeight= imgWid;
self.backgroundColor=[UIColor colorWithWhite:0 alpha:0.5];
_picBackImg
=[[UIImageView alloc]initWithFrame:CGRectMake(40,kScreenSize.height/2-imHeight/2, imgWid, imHeight)];
@@ -56,7 +56,7 @@
_pic=[[UIPickerView alloc]initWithFrame:CGRectMake(10,CGRectGetMaxY(title.frame) + 2,imgWid - 20,imHeight -30 - 40- 20)];
_pic.dataSource=self;
_pic.delegate=self;
//_pic.backgroundColor = [UIColor blueColor];
// _pic.backgroundColor = [UIColor blueColor];
[_picBackImg addSubview:_pic];
_sureBtn
@@ -128,7 +128,7 @@
-(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{
return pickerView.frame.size.height/5;;
return pickerView.frame.size.height/5;
}
-(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{
@@ -0,0 +1,18 @@
//
// PlusTableViewCell.h
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PlusTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *addTimerBtn;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,24 @@
//
// PlusTableViewCell.m
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "PlusTableViewCell.h"
@implementation PlusTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,55 @@
<?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>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="PlusTableViewCell" id="KGk-i7-Jjw" customClass="PlusTableViewCell">
<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"/>
<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"/>
</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"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="JFm-fG-5wE"/>
<constraint firstAttribute="height" constant="46" id="mks-Ww-o3r"/>
</constraints>
<state key="normal" title="Button" image="add.png"/>
</button>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="Hc6-I7-yDU" secondAttribute="bottom" id="4XC-uZ-krh"/>
<constraint firstItem="Hc6-I7-yDU" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="AOs-ca-r9O"/>
<constraint firstAttribute="bottomMargin" secondItem="6h6-2g-eDK" secondAttribute="bottom" constant="6" id="O7P-cJ-0Td"/>
<constraint firstItem="Hc6-I7-yDU" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="mgo-88-WkE"/>
<constraint firstItem="6h6-2g-eDK" firstAttribute="centerX" secondItem="Hc6-I7-yDU" secondAttribute="centerX" id="qKW-KJ-7mz"/>
<constraint firstAttribute="trailing" secondItem="Hc6-I7-yDU" secondAttribute="trailing" id="uAr-26-OBx"/>
<constraint firstItem="6h6-2g-eDK" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="6" id="vOS-Fx-aNK"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="addTimerBtn" destination="6h6-2g-eDK" id="Jsg-om-i4G"/>
</connections>
<point key="canvasLocation" x="52.799999999999997" y="149.32533733133434"/>
</tableViewCell>
</objects>
<resources>
<image name="add.png" width="46" height="46"/>
<image name="ifishSetCell_back.png" width="1080" height="140"/>
</resources>
</document>
@@ -0,0 +1,21 @@
//
// SetTimerCell.h
// Ifish
//
// Created by Alex on 2019/5/1.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SetTimerCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *switchBtn;
- (void)configTitleLabel:(NSString *)title timer:(NSString *)timeStr switchStatus:(BOOL)status;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,36 @@
//
// SetTimerCell.m
// Ifish
//
// Created by Alex on 2019/5/1.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "SetTimerCell.h"
@interface SetTimerCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timerLabel;
@end
@implementation SetTimerCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)configTitleLabel:(NSString *)title timer:(NSString *)timeStr switchStatus:(BOOL)status {
_titleLabel.text = title;
_timerLabel.text = timeStr;
_switchBtn.selected = status;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,77 @@
<?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>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="SetTimerCell" id="KGk-i7-Jjw" customClass="SetTimerCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
<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="49.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<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="49.5"/>
</imageView>
<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"/>
<color key="textColor" red="0.34901960780000002" green="0.34901960780000002" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="05:00 - 10:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hQu-ZP-ugr">
<rect key="frame" x="116" y="17" width="100" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="AIP-fQ-0bt"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.34901960780000002" green="0.34901960780000002" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SDK-gA-raP">
<rect key="frame" x="252" y="15" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="RJB-PE-8Ny"/>
<constraint firstAttribute="width" constant="40" id="aNb-sP-6cp"/>
</constraints>
<state key="normal" title="Button" image="Switch-Off.png"/>
<state key="selected" image="Switch-On.png"/>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="P3o-KY-LIT" secondAttribute="trailing" id="2yN-ro-gmU"/>
<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="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="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="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"/>
</connections>
<point key="canvasLocation" x="137.59999999999999" y="107.94602698650675"/>
</tableViewCell>
</objects>
<resources>
<image name="Switch-Off.png" width="60" height="30"/>
<image name="Switch-On.png" width="60" height="30"/>
<image name="ifishSetCell_back.png" width="1080" height="140"/>
</resources>
</document>
@@ -18,7 +18,7 @@
#define XUTOCHCELL_JIARE 50005
@interface XuToControlNameViewController ()
@property (nonatomic,assign) BOOL isModify;
@end
@implementation XuToControlNameViewController
@@ -88,37 +88,57 @@
}
if (indexPath.section==1&&indexPath.row==0) {
if (_isNewdevice) {
cell.chName.text = name.shajunLight;
NSLog(@"wde name = %@",cell.chName.text);
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.shajunLight]) {
}else {
cell.chName.text = name.shajunLight;
}
}else {
cell.chName.text = name.airPump;
}
}else if (indexPath.section==1&&indexPath.row==1){
if (_isNewdevice) {
cell.chName.text = name.zengyangPump;
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.zengyangPump]) {
}else {
cell.chName.text = name.zengyangPump;
}
}else{
cell.chName.text = name.light1;
}
}else if (indexPath.section==1&&indexPath.row==2){
if (_isNewdevice) {
cell.chName.text = name.light1;
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.light1]) {
}else {
cell.chName.text = name.light1;
}
}else{
cell.chName.text = name.light2;
}
}else if (indexPath.section==1&&indexPath.row==3){
if (_isNewdevice) {
cell.chName.text = name.light2;
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.light2]) {
}else{
cell.chName.text = name.light2;
}
}else{
cell.chName.text = name.huLiDeng;
}
}else if (indexPath.section==1&&indexPath.row==4){
if (_isNewdevice) {
cell.chName.text = name.zaolangPump;
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.zaolangPump]) {
}else{
cell.chName.text = name.zaolangPump;
}
}else{
cell.chName.text = name.waterPump;
}
}else if (indexPath.section==1&&indexPath.row==5){
if (_isNewdevice) {
cell.chName.text = name.huLiDeng;
if ((cell.chName.text.length>0) & ![cell.chName.text isEqualToString:@"控制名"] & ![cell.chName.text isEqualToString:name.huLiDeng]) {
}else{
cell.chName.text = name.huLiDeng;
}
}else{
cell.chName.text = name.jiaRe;
}
@@ -135,7 +155,6 @@
-(void)sureAction
{
//RunSunCHNameCustom 本地处理 保存按钮名称 不与服务器交互
XuToControlName *name = [[XuToControlName alloc] init];
RuSunChangeNameTextViewCell*cell1 = [self.view viewWithTag:XUTOCHCELL_AIR];
@@ -20,9 +20,6 @@
@property(nonatomic,strong)NSArray*titleArr;
@property(nonatomic)BOOL isAuto;// 自动模式
@property(nonatomic)UIActivityIndicatorView*indicatorView;
/// 是否是新绚多设备
@property(nonatomic,assign)BOOL isNewDevice;
-(void)addAlertView;
@property(nonatomic)int percent;
@@ -68,9 +68,6 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
if (_isNewDevice) {
[self.navigationController.navigationBar resetBackgroundImage];
}
_waterInfmodel=[[setRemindWaterModel alloc]init];
[super viewDidLoad];
_mainQueue = dispatch_get_main_queue();
@@ -198,7 +195,6 @@
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
XutoBackMsgModel *backmodel=[[DataCenter defaultDtacenter]valueForKey:@"xutoBackInfo"];
@@ -358,7 +354,7 @@
}
SetTimeModel*model=[[SetTimeModel alloc]init];
SetTimeModel*model=[[SetTimeModel alloc]init];
model.title=self.titleArr[indexPath.section][indexPath.row];
cell.titleLabel.text=model.title;
model.timestring=self.timeArr[indexPath.section][indexPath.row];
@@ -8,6 +8,7 @@
#import <Foundation/Foundation.h>
#import "Xuanduo2Model.h"
#import "Xuanduo2TimerModel.h"
NS_ASSUME_NONNULL_BEGIN
@@ -15,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
+(void)readSocketDataWithBackMsgModel:(Xuanduo2Model*)xuanduoModel addWithBackData:(NSData*)data;
+(void)readTimerSocketDataWithBackMsgModel:(Xuanduo2TimerModel*)xuanduoTimerModel addWithBackStr:(NSString*)dataStr;
+(void)resetNewXuanduoButtonState:(UIButton*)uvLightBtn gasPumpLight:(UIButton*)gasLightBtn light1:(UIButton*)light1Btn light2:(UIButton*)light2Btn waveLight:(UIButton*)waveLightBtn huliLight:(UIButton*)huliLightBtn waterLight:(UIButton*)waterLightBtn heatLight:(UIButton*)heatLightBtn withModel:(Xuanduo2Model*)backModel;
@end
@@ -86,4 +86,26 @@
}
}
+(void)readTimerSocketDataWithBackMsgModel:(Xuanduo2TimerModel*)xuanduoTimerModel addWithBackStr:(NSString*)dataStr {
xuanduoTimerModel.lightNumber = [dataStr substringWithRange:NSMakeRange(30, 2)];
xuanduoTimerModel.groupSum = [dataStr substringWithRange:NSMakeRange(32, 2)];
UInt64 sum = [dataContorl hexToTen:xuanduoTimerModel.groupSum];
for (int i = 0; i < sum; i ++) {
NSString *groupStr = [dataStr substringWithRange:NSMakeRange(34+i*12, 12)];
XuanduoTimerGroup *group = [[XuanduoTimerGroup alloc] init];
group.groupNumber = [NSString stringWithFormat:@"%llu",[dataContorl hexToTen:[groupStr substringWithRange:NSMakeRange(0, 2)]]];
NSString *str1 = [groupStr substringWithRange:NSMakeRange(0, 2)];
NSLog(@"====== str1 ==== %@",str1);
group.status = [groupStr substringWithRange:NSMakeRange(2, 2)];
NSString *startStr = [dataContorl hexStringToDateString:[groupStr substringWithRange:NSMakeRange(4, 4)]];
NSString *endStr = [dataContorl hexStringToDateString:[groupStr substringWithRange:NSMakeRange(8, 4)]];
if ([startStr compare:endStr] == NSOrderedDescending) {
group.isCrossDay = YES;
}
group.startTime = startStr;
group.endTime = endStr;
group.time = [NSString stringWithFormat:@"%@ - %@",startStr,endStr];
[xuanduoTimerModel.groupModelArr addObject:group];
}
}
@end
@@ -0,0 +1,25 @@
//
// Xuanduo2SettingController.h
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "FatherController.h"
NS_ASSUME_NONNULL_BEGIN
@class Xuanduo2Model;
@interface Xuanduo2SettingController : FatherController
@property (nonatomic,strong) UIActivityIndicatorView*indicatorView;
@property (nonatomic ,strong) Xuanduo2Model *dataModel;
@property(nonatomic,strong) DeviceModel* currentdevice;
- (void)refreshWithData:(Xuanduo2Model *)model;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,48 @@
//
// Xuanduo2TimerModel.h
// Ifish
//
// Created by Alex on 2019/5/3.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#if 0
01 16 807d3a42a200 807d3a42a200 25
05
03
01 00 0501 0403
02 00 060f 0e11
03 00 0f15 1410
17cc
#endif
@interface XuanduoTimerGroup : NSObject
/// 时间段
@property (nonatomic, strong) NSString *time;
/// 灯状态
@property (nonatomic, strong) NSString *status;
/// 第几组
@property (nonatomic, strong) NSString *groupNumber;
@property (nonatomic, strong) NSString *startTime;
@property (nonatomic, strong) NSString *endTime;
/// 是否跨天
@property (nonatomic, assign) BOOL isCrossDay;
@end
@interface Xuanduo2TimerModel : NSObject
/// 灯的序号
@property (nonatomic, strong) NSString *lightNumber;
@property (nonatomic, strong) NSString *groupSum;
@property (nonatomic, strong) NSMutableArray *groupModelArr;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,17 @@
//
// Xuanduo2TimerModel.m
// Ifish
//
// Created by Alex on 2019/5/3.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "Xuanduo2TimerModel.h"
@implementation XuanduoTimerGroup
@end
@implementation Xuanduo2TimerModel
@end
@@ -12,7 +12,6 @@
#import "DeviceCameraModel.h"
#import "XuToControlNameViewController.h"
#import "IfishDataUnity.h"
#import "XuToSetViewController.h"
#import "CreatErWeiMaController.h"
#import "SongBaoViewController.h"
#import "XuToControlName.h"
@@ -21,10 +20,16 @@
#import "NSString+Add.h"
#import "XuanduoHuliModel.h"
#import "Xuanduo2DataUtility.h"
#import "HaveHotCoolWenDuPicview.h"
#import "Xuanduo2SettingController.h"
#import "RuSunLightOrder.h"
#import "JHRefreshAmazingAniView.h"
#import "JHRefresh.h"
#import "searchDeviceModel.h"
#define kBtnTag 100
@interface Xuanduo2fController ()<LxPopViewDelegate,IfishCommuniteDelegate>
@interface Xuanduo2fController ()<LxPopViewDelegate,IfishCommuniteDelegate,HaveHotCoolWenDuPicviewDelegate,UIScrollViewDelegate>
@property(nonatomic,strong) DXPopover *popover;
@property (weak, nonatomic) IBOutlet UIView *positionView;
@property (weak, nonatomic) IBOutlet UILabel *shajunLight;
@@ -50,7 +55,15 @@
@property (weak, nonatomic) IBOutlet UIButton *waterLight;
@property (weak, nonatomic) IBOutlet UIButton *heatLight;
@property(nonatomic,copy) UIActivityIndicatorView *indicatorView;
@property(nonatomic,strong) HaveHotCoolWenDuPicview *wenduPicview;
@property(nonatomic,strong) MyHud *XuTohud;
@property (weak, nonatomic) IBOutlet UILabel *offLineLabel;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollview;
@property(nonatomic)BOOL isRefeshing;
@property(nonatomic) BOOL isconnect;// socket 是否连接
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@end
@@ -58,6 +71,7 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[Socketsingleton sharedInstance].communiteDelegate = self;
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName :[UIColor blackColor]};
}
@@ -86,6 +100,7 @@
[Socketsingleton sharedInstance].communiteDelegate = self;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tempSwitch)];
[self.tempLabel addGestureRecognizer:tap];
[self creatRefreshView];
}
- (void)connect {
@@ -94,6 +109,48 @@
}
}
#pragma mark 刷新
-(void)creatRefreshView{
self.scrollview.delegate = self;
__weak typeof (self)weakSelf=self;
[weakSelf.scrollview addRefreshHeaderViewWithAniViewClass:[JHRefreshAmazingAniView class] beginRefresh:^{
if (weakSelf.isRefeshing) {
return ;
}
weakSelf.isRefeshing=YES;
if (weakSelf.isconnect) {
searchDeviceModel*xinxiModel=[[searchDeviceModel alloc]init];
xinxiModel.resavemacId = self.currentDevice.macAddress;
xinxiModel.sendmacId = self.currentDevice.macAddress;
NSString*requestStr=xinxiModel.description;
NSLog(@"REQUEST = %@",requestStr);
NSData*data1=[dataContorl stringToHexData:requestStr];
[[Socketsingleton sharedInstance].clientSocket writeData:data1 withTimeout:-1 tag:0];
[[Socketsingleton sharedInstance].clientSocket readDataWithTimeout:-1 tag:0];
}else{// socket中断
[weakSelf InitSocket];
}
}];
}
-(void)endRefreshing{
if (self.isRefeshing) {
self.isRefeshing=NO;
[self.scrollview headerEndRefreshingWithResult:JHRefreshResultSuccess];
}
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
CGFloat offset = scrollView.contentOffset.y;
if (offset >0) {
[self.scrollview setContentOffset:CGPointMake(0, 0)];
}
}
#pragma mark 连接socket
-(void)InitSocket{
NSLog(@"******%d",[Socketsingleton sharedInstance].clientSocket.isConnected);
@@ -112,14 +169,14 @@
//断线重连功能需要在这里进行
-(void)ifishSocketDidDisconnect:(AsyncSocket *)sock{
_isconnect=NO;
[self endRefreshing];
}
-(void)ifishSocket:(AsyncSocket *)sock willDisconnectWithError:(NSError *)err{
// NSLog(@"soket错误断开");
// NSLog(@"存留数据%@",[sock unreadData]);
_offLineLabel.hidden = NO;
}
-(BOOL)ifishSocketWillConnect:(AsyncSocket *)sock{
@@ -134,13 +191,13 @@
-(void)ifishSocket:(AsyncSocket *)sock ifishSocketdidConnectToHost:(NSString *)host port:(UInt16)port{
//已建立连接 登陆指令同意在soket单例中
_isconnect=YES;
}
//发送完成处理
-(void)ifishSocket:(AsyncSocket *)sock didWriteDataWithTag:(long)tag{
[self endRefreshing];
}
#pragma mark 登陆成功后收到服务端的回执之后,调用的代理方法
@@ -152,13 +209,20 @@
-(void)socketDidGetBackmsgData:(NSData *)data onsoket:(AsyncSocket *)sock{
//[_HUD hide:YES];
[self.XuTohud hidmyHud];
[self endRefreshing];
NSLog(@"123124124");
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:self.dataModel addWithBackData:data];
if ([self.tipLabel.text isEqualToString:@"鱼缸温度"]) {
[self setTemperature];
}
if (self.dataModel.gasPump) {
_offLineLabel.hidden = YES;
}else {
_offLineLabel.hidden = NO;
}
[Xuanduo2DataUtility resetNewXuanduoButtonState:self.uvLight gasPumpLight:self.gasPumpLight light1:self.light1 light2:self.light2 waveLight:self.waveLight huliLight:self.huliLight waterLight:self.waterLight heatLight:self.heatLight withModel:self.dataModel];
}
-(void)ifishDeviceLogInFail{
}
@@ -174,7 +238,7 @@
#pragma mark -- actions --
- (IBAction)btnActions:(UIButton *)btn {
if (self.dataModel) {
if (self.dataModel.gasPump) {
}else{
[self showLableAction:@"设备已离线"];
@@ -190,9 +254,20 @@
}
lightModel.crc16Str=@"0000";// CRC16验证码
switch (btn.tag) {
case kBtnTag: //杀菌灯
case kBtnTag: // 循环泵
{
[self changLightStatus:lightModel withLightNumber:@"05" dataStr:switchString1];
if (btn.selected) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"确认关闭循环泵?" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:nil];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1];
}];
[alertController addAction:cancelAction];
[alertController addAction:sureAction];
[self.navigationController presentViewController:alertController animated:YES completion:nil];
}else {
[self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1];
}
}
break;
case kBtnTag + 1: //增氧
@@ -215,7 +290,12 @@
[self changLightStatus:lightModel withLightNumber:@"06" dataStr:switchString1];
}
break;
case kBtnTag + 5: //护理灯 单独处理
case kBtnTag + 5: //杀菌灯
{
[self changLightStatus:lightModel withLightNumber:@"05" dataStr:switchString1];
}
break;
case kBtnTag + 6: //护理灯 单独处理
{
XuanduoHuliModel *huliModel = [[XuanduoHuliModel alloc] init];
huliModel.sendmacId = self.currentDevice.macAddress;
@@ -237,14 +317,28 @@
}
}
break;
case kBtnTag + 6: //循环泵
{
[self changLightStatus:lightModel withLightNumber:@"04" dataStr:switchString1];
}
break;
case kBtnTag + 7: //加热棒
{
[self changLightStatus:lightModel withLightNumber:@"" dataStr:switchString1];
if (self.dataModel.gasPump) {
_wenduPicview=[[HaveHotCoolWenDuPicview alloc] init];
_wenduPicview.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height);
[_wenduPicview.sureBtn addTarget:self action:@selector(sureBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view.window addSubview:_wenduPicview];
_wenduPicview.wenDuPicviewDelegate = self;
NSString *stateStr =nil;
if ([self.dataModel.status isKindOfClass:[NSNull class]]||!self.dataModel.status ) {
self.dataModel.status = @"0000";
}
stateStr = [self.dataModel.status substringWithRange:NSMakeRange(2, 2)];
[_wenduPicview initCateBtnSate:stateStr];
[self heatAction];
}else{
[self showLableAction:@"设备已离线"];
}
}
break;
default:
@@ -252,6 +346,80 @@
}
}
#pragma mark - 加热棒处理 -
- (void)sureBtnClick:(UIButton *)btn {
NSLog(@"%@******** _wenduPicview.picViewResultString",_wenduPicview.picViewResultString);
if (_wenduPicview.picViewResultString ==nil) {
[_wenduPicview removeFromSuperview];
}else{
JiaReWenDuModel *model=[[JiaReWenDuModel alloc] init];
model.resavemacId = self.currentDevice.macAddress;
model.sendmacId = self.currentDevice.macAddress;
int intlowString = [_wenduPicview.picViewResultString intValue];
int newIntlowString=intlowString*10;
NSLog(@"%d******** newIntlowString",newIntlowString);
// 转四位16进制
model.JiaReWenDu=[dataContorl tpIntStringToFourHex:newIntlowString];
model.crc16Code =@"0000";
NSString * hexstring=[NSString stringWithFormat:@"%@%@%@",model.description,model.JiaReWenDu,model.crc16Code];
NSData*data=[dataContorl stringToHexData:hexstring];
[ [Socketsingleton sharedInstance] soketWriteData:data];
}
[_wenduPicview removeFromSuperview];
}
- (void)heatAction
{
UInt64 mac=[dataContorl hexToTen:self.dataModel.heatingTemperature];
NSLog(@"%llu",mac);
float TPlabel=mac/10;
int temp= (int)(TPlabel+0.5);
NSString *stringFloat = [NSString stringWithFormat:@"%d",temp];
NSLog(@"%@",stringFloat);
NSArray*wenDuArr=[_wenduPicview.picArr objectAtIndex:0];
for (NSInteger i=0; i<wenDuArr.count; i++) {
NSString*picString=wenDuArr[i];
if ([picString isEqualToString:stringFloat ] ) {
[_wenduPicview.pic selectRow:i inComponent:0 animated:NO];
}
}
}
#pragma mark - 制冷制热指令
-(void)didSelectCoolOrHeat:(NSString *)hotCool{
RuSunLightOrder*lightOrder=[[RuSunLightOrder alloc]init];
lightOrder.sendmacId = self.currentDevice.macAddress;
lightOrder.resavemacId = self.currentDevice.macAddress;
NSString*switchString1=lightOrder.description;
lightOrder.switchBtn = hotCool;
lightOrder.crc16Str=@"0000";
lightOrder.lightNumber=@"07";
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString1,lightOrder.lightNumber,lightOrder.switchBtn,lightOrder.crc16Str];
NSData*manulData=[dataContorl stringToHexData:switchString2];
[ [Socketsingleton sharedInstance] soketWriteData:manulData];
if ([Socketsingleton sharedInstance].clientSocket.isConnected) {
//soket 未断开时显示
[self creatXuToindicaterView];
[self.XuTohud myhudstart];
}
}
#pragma mark - 灯的控制
- (void)changLightStatus:(XuToLightModel *)lightModel withLightNumber:(NSString *)number dataStr:(NSString *)switchString1 {
lightModel.lightNumber = number;
NSString *switchString2 = [NSString stringWithFormat:@"%@%@%@%@",switchString1,lightModel.lightNumber,lightModel.switchBtn,lightModel.crc16Str];
@@ -332,8 +500,8 @@
-(void)creatXuToindicaterView{
self.XuTohud = [[MyHud alloc]init];
self.XuTohud.frame=CGRectMake(0, kScreenSize.height/3, kScreenSize.width,kScreenSize.height*2/3 );
self.XuTohud.frame=CGRectMake(0, CGRectGetMaxY(_tempLabel.frame) + 4, kScreenSize.width,kScreenSize.height*2/3 );
self.XuTohud.hudActivityView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
[self.XuTohud myhudtimeOut];
//self.XuTohud.backgroundColor=[UIColor redColor];
@@ -342,7 +510,6 @@
}
#pragma mark - PopViewDelagate
-(void)disSelectedPopViewIndex:(NSIndexPath *)Index{
@@ -534,10 +701,16 @@
#pragma mark -设置页面 -
- (void)setting {
XuToSetViewController * _xuToSetVC=[[XuToSetViewController alloc] init];
_xuToSetVC.currentdevice=self.currentDevice;
_xuToSetVC.isNewDevice = YES;
[self.navigationController pushViewController:_xuToSetVC animated:YES];
if (self.dataModel.gasPump) {
Xuanduo2SettingController *_settingVC = [[Xuanduo2SettingController alloc] init];
_settingVC.currentdevice = self.currentDevice;
_settingVC.dataModel = self.dataModel;
[self.navigationController pushViewController:_settingVC animated:YES];
}else{
[self.indicatorView stopAnimating];
[self showLableAction:@"设备已离线"];
[self.XuTohud hidmyHud];
}
}
-(void)showTitle:(NSString*)title messsage:(NSString*)message{
@@ -555,7 +728,8 @@
- (void)showLableAction:(NSString *)str{
UILabel *laberAction =[[UILabel alloc]init];
laberAction.frame =CGRectMake((kScreenSize.width/2) - 50, kScreenSize.height/2 , 100, 50);
laberAction.frame =CGRectMake(0, 0 , 100, 50);
laberAction.center = [[UIApplication sharedApplication] delegate].window.center;
laberAction.clipsToBounds =YES;
laberAction.layer.cornerRadius =5;
laberAction.alpha =1;
@@ -1,6 +1,6 @@
<?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">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
@@ -14,64 +14,68 @@
<connections>
<outlet property="brandBtn" destination="KcF-jg-Mz2" id="90Z-SG-zCz"/>
<outlet property="brandName" destination="pjU-4c-KIu" id="7o4-eb-hHX"/>
<outlet property="contentView" destination="aik-7S-q8v" id="uIf-SZ-FJV"/>
<outlet property="gasPumpLight" destination="ZVe-ED-kl7" id="mbB-kR-vdN"/>
<outlet property="heatLight" destination="fFJ-1w-2f5" id="SYo-Yn-tUf"/>
<outlet property="huliLabel" destination="OLb-WT-tQ0" id="zfj-0D-wQW"/>
<outlet property="huliLight" destination="ucP-6q-kgn" id="88Z-Hm-G7b"/>
<outlet property="huliLabel" destination="7KA-Hc-54C" id="jOn-NM-fyy"/>
<outlet property="huliLight" destination="wZH-6A-6dN" id="dpr-CY-8Ta"/>
<outlet property="imageView" destination="EVp-Sm-Feq" id="LYx-tg-6Wh"/>
<outlet property="jiareLabel" destination="r24-bR-0zZ" id="1FX-Ye-0ju"/>
<outlet property="light1" destination="WFc-cF-80l" id="KWL-WD-5Ce"/>
<outlet property="light1Label" destination="w1W-F8-kDG" id="9Tm-jx-s9C"/>
<outlet property="light2" destination="RHd-Xx-AyG" id="9hu-GA-aKN"/>
<outlet property="light2Label" destination="k4O-MJ-aZd" id="dsc-dG-n76"/>
<outlet property="offLineLabel" destination="Jp2-HW-vcX" id="DoA-6l-HZa"/>
<outlet property="positionView" destination="G1c-II-WK8" id="4Cm-FT-QIK"/>
<outlet property="shajunLight" destination="zRG-Xz-MbP" id="LTQ-hk-FrW"/>
<outlet property="scrollview" destination="H1f-gs-HPh" id="QY1-g9-hei"/>
<outlet property="shajunLight" destination="OLb-WT-tQ0" id="WTj-RN-LoJ"/>
<outlet property="tempLabel" destination="brS-3x-RcE" id="eAw-p5-o08"/>
<outlet property="tipLabel" destination="vcu-MT-d6F" id="f4o-WG-803"/>
<outlet property="uvLight" destination="94R-4Q-SUx" id="Lja-bT-2GS"/>
<outlet property="uvLight" destination="ucP-6q-kgn" id="h0M-05-ZQd"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
<outlet property="waterLight" destination="wZH-6A-6dN" id="kyb-Lh-sdc"/>
<outlet property="waterLight" destination="94R-4Q-SUx" id="sLi-lF-GPC"/>
<outlet property="waveLight" destination="83l-yl-ndR" id="Ppq-0b-uJB"/>
<outlet property="xunhuanLabel" destination="7KA-Hc-54C" id="QRq-jP-IC4"/>
<outlet property="xunhuanLabel" destination="zRG-Xz-MbP" id="jCW-ap-zLb"/>
<outlet property="zaolangLabel" destination="BWx-iu-nY0" id="rxl-X0-mne"/>
<outlet property="zengyangLabel" destination="Dse-Ih-U5R" id="sjC-JB-eMQ"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H1f-gs-HPh">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<rect key="frame" x="0.0" y="20" width="320" height="548"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aik-7S-q8v" userLabel="Content View">
<rect key="frame" x="0.0" y="0.0" width="375" height="600.5"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="775"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xuanduo_bg" translatesAutoresizingMaskIntoConstraints="NO" id="EVp-Sm-Feq">
<rect key="frame" x="0.0" y="0.0" width="375" height="260"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xuanduo_bg" translatesAutoresizingMaskIntoConstraints="NO" id="EVp-Sm-Feq">
<rect key="frame" x="0.0" y="0.0" width="320" height="300"/>
<constraints>
<constraint firstAttribute="height" constant="260" id="V9N-xo-Uzm"/>
<constraint firstAttribute="height" constant="300" id="V9N-xo-Uzm"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="鱼缸温度" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vcu-MT-d6F">
<rect key="frame" x="156.5" y="320" width="62" height="18"/>
<rect key="frame" x="129" y="314" width="62" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="94R-4Q-SUx">
<rect key="frame" x="30" y="383" width="46" height="46"/>
<button opaque="NO" tag="100" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="94R-4Q-SUx">
<rect key="frame" x="30" y="372" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="94R-4Q-SUx" secondAttribute="height" multiplier="1:1" id="zkk-3F-Fut"/>
</constraints>
<state key="normal" backgroundImage="shajun_normal"/>
<state key="selected" backgroundImage="shajun_selected"/>
<state key="normal" backgroundImage="xunhuan_noraml"/>
<state key="selected" backgroundImage="xunhuan_selected"/>
<connections>
<action selector="btnActions:" destination="-1" eventType="touchUpInside" id="Gyn-cy-b2q"/>
</connections>
</button>
<button opaque="NO" tag="101" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZVe-ED-kl7">
<rect key="frame" x="120" y="383" width="45.5" height="46"/>
<rect key="frame" x="105" y="372" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="ZVe-ED-kl7" secondAttribute="height" multiplier="1:1" id="Nyb-kW-maB"/>
</constraints>
@@ -82,7 +86,7 @@
</connections>
</button>
<button opaque="NO" tag="102" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WFc-cF-80l">
<rect key="frame" x="209.5" y="383" width="46" height="46"/>
<rect key="frame" x="180" y="372" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="WFc-cF-80l" secondAttribute="height" multiplier="1:1" id="KNO-vi-GYn"/>
</constraints>
@@ -93,7 +97,7 @@
</connections>
</button>
<button opaque="NO" tag="103" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RHd-Xx-AyG">
<rect key="frame" x="299.5" y="383" width="45.5" height="46"/>
<rect key="frame" x="255" y="372" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="RHd-Xx-AyG" secondAttribute="height" multiplier="1:1" id="npW-2w-QHd"/>
</constraints>
@@ -103,32 +107,32 @@
<action selector="btnActions:" destination="-1" eventType="touchUpInside" id="kAA-hr-Wun"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="杀菌灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRG-Xz-MbP">
<rect key="frame" x="34.5" y="433" width="37" height="15"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="循环泵" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zRG-Xz-MbP">
<rect key="frame" x="29" y="411" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="增氧泵" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dse-Ih-U5R">
<rect key="frame" x="124" y="433" width="37" height="15"/>
<rect key="frame" x="104" y="411" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="灯光1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w1W-F8-kDG">
<rect key="frame" x="217" y="433" width="31" height="15"/>
<rect key="frame" x="182" y="411" width="31" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="灯光2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k4O-MJ-aZd">
<rect key="frame" x="306" y="433" width="32" height="15"/>
<rect key="frame" x="256.5" y="411" width="32" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" tag="104" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="83l-yl-ndR">
<rect key="frame" x="30" y="491" width="46" height="45.5"/>
<rect key="frame" x="30" y="451" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="83l-yl-ndR" secondAttribute="height" multiplier="1:1" id="w6a-qu-5EK"/>
</constraints>
@@ -139,29 +143,29 @@
</connections>
</button>
<button opaque="NO" tag="105" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ucP-6q-kgn">
<rect key="frame" x="120" y="491" width="45.5" height="45.5"/>
<rect key="frame" x="105" y="451" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="ucP-6q-kgn" secondAttribute="height" multiplier="1:1" id="Vkv-7O-YZz"/>
</constraints>
<state key="normal" backgroundImage="huli_noraml"/>
<state key="selected" backgroundImage="huli_selected"/>
<state key="normal" backgroundImage="shajun_normal"/>
<state key="selected" backgroundImage="shajun_selected"/>
<connections>
<action selector="btnActions:" destination="-1" eventType="touchUpInside" id="jNj-Lu-4Vh"/>
</connections>
</button>
<button opaque="NO" tag="106" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wZH-6A-6dN">
<rect key="frame" x="209.5" y="491" width="46" height="45.5"/>
<rect key="frame" x="180" y="451" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="wZH-6A-6dN" secondAttribute="height" multiplier="1:1" id="526-Hn-VeS"/>
</constraints>
<state key="normal" backgroundImage="xunhuan_noraml"/>
<state key="selected" backgroundImage="xunhuan_selected"/>
<state key="normal" backgroundImage="huli_noraml"/>
<state key="selected" backgroundImage="huli_selected"/>
<connections>
<action selector="btnActions:" destination="-1" eventType="touchUpInside" id="zCg-7a-yCn"/>
</connections>
</button>
<button opaque="NO" tag="107" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fFJ-1w-2f5">
<rect key="frame" x="299.5" y="491" width="45.5" height="45.5"/>
<rect key="frame" x="255" y="451" width="35" height="35"/>
<constraints>
<constraint firstAttribute="width" secondItem="fFJ-1w-2f5" secondAttribute="height" multiplier="1:1" id="4jg-CV-sDI"/>
</constraints>
@@ -172,31 +176,31 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="造浪泵" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BWx-iu-nY0">
<rect key="frame" x="34.5" y="540.5" width="37" height="15"/>
<rect key="frame" x="29" y="490" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="护理灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OLb-WT-tQ0">
<rect key="frame" x="124" y="540.5" width="37" height="15"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="杀菌灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OLb-WT-tQ0">
<rect key="frame" x="104" y="490" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="循环泵" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7KA-Hc-54C">
<rect key="frame" x="214" y="540.5" width="37" height="15"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="护理灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7KA-Hc-54C">
<rect key="frame" x="179" y="490" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="加热棒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r24-bR-0zZ">
<rect key="frame" x="303.5" y="540.5" width="37" height="15"/>
<rect key="frame" x="254" y="490" width="37" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G1c-II-WK8">
<rect key="frame" x="275" y="0.0" width="100" height="44"/>
<rect key="frame" x="220" y="0.0" width="100" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="cOL-94-UdY"/>
@@ -204,17 +208,17 @@
</constraints>
</view>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0 ℃" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="brS-3x-RcE">
<rect key="frame" x="137.5" y="210" width="100" height="100"/>
<color key="backgroundColor" red="0.70196078431372544" green="0.70196078431372544" blue="0.70196078431372544" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="115" y="209" width="90" height="90"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="GQu-NL-cde"/>
<constraint firstAttribute="width" constant="100" id="PVA-da-FwT"/>
<constraint firstAttribute="height" constant="90" id="GQu-NL-cde"/>
<constraint firstAttribute="width" constant="90" id="PVA-da-FwT"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="27"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="50"/>
<userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="45"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</label>
@@ -235,27 +239,42 @@
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设备已离线" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jp2-HW-vcX">
<rect key="frame" x="120" y="338" width="80" height="25"/>
<color key="backgroundColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="gtN-UH-BAO"/>
<constraint firstAttribute="height" constant="25" id="hZR-yA-AUw"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="5"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="WFc-cF-80l" firstAttribute="top" secondItem="ZVe-ED-kl7" secondAttribute="top" id="0BY-oG-gcd"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="width" secondItem="94R-4Q-SUx" secondAttribute="width" id="3se-2R-nR8"/>
<constraint firstItem="vcu-MT-d6F" firstAttribute="top" secondItem="brS-3x-RcE" secondAttribute="bottom" constant="10" id="4B2-Mr-ob3"/>
<constraint firstItem="vcu-MT-d6F" firstAttribute="top" secondItem="brS-3x-RcE" secondAttribute="bottom" constant="15" id="4B2-Mr-ob3"/>
<constraint firstItem="OLb-WT-tQ0" firstAttribute="top" secondItem="ucP-6q-kgn" secondAttribute="bottom" constant="4" id="4Bf-gm-YTx"/>
<constraint firstItem="pjU-4c-KIu" firstAttribute="top" secondItem="KcF-jg-Mz2" secondAttribute="bottom" constant="8" id="4U0-5n-ux5"/>
<constraint firstItem="k4O-MJ-aZd" firstAttribute="top" secondItem="RHd-Xx-AyG" secondAttribute="bottom" constant="4" id="6Bg-et-4ju"/>
<constraint firstItem="G1c-II-WK8" firstAttribute="top" secondItem="aik-7S-q8v" secondAttribute="top" id="83E-pJ-8Fg"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="top" secondItem="83l-yl-ndR" secondAttribute="top" id="9Cs-Lk-q7I"/>
<constraint firstItem="RHd-Xx-AyG" firstAttribute="width" secondItem="94R-4Q-SUx" secondAttribute="width" id="A2B-qb-Kn1"/>
<constraint firstItem="83l-yl-ndR" firstAttribute="top" secondItem="zRG-Xz-MbP" secondAttribute="bottom" constant="43" id="AAh-cS-gv0"/>
<constraint firstItem="83l-yl-ndR" firstAttribute="top" secondItem="zRG-Xz-MbP" secondAttribute="bottom" constant="25" id="AAh-cS-gv0"/>
<constraint firstItem="pjU-4c-KIu" firstAttribute="centerX" secondItem="KcF-jg-Mz2" secondAttribute="centerX" id="AHE-tf-SLB"/>
<constraint firstItem="wZH-6A-6dN" firstAttribute="top" secondItem="ucP-6q-kgn" secondAttribute="top" id="B3z-EE-VMG"/>
<constraint firstAttribute="bottom" secondItem="BWx-iu-nY0" secondAttribute="bottom" constant="45" id="BOU-73-VsD"/>
<constraint firstItem="7KA-Hc-54C" firstAttribute="centerX" secondItem="wZH-6A-6dN" secondAttribute="centerX" id="CuI-89-MX4"/>
<constraint firstItem="Dse-Ih-U5R" firstAttribute="centerX" secondItem="ZVe-ED-kl7" secondAttribute="centerX" id="D07-Uf-iIg"/>
<constraint firstItem="EVp-Sm-Feq" firstAttribute="leading" secondItem="aik-7S-q8v" secondAttribute="leading" id="DPJ-uL-72p"/>
<constraint firstItem="r24-bR-0zZ" firstAttribute="top" secondItem="fFJ-1w-2f5" secondAttribute="bottom" constant="4" id="DRU-RZ-TFh"/>
<constraint firstItem="83l-yl-ndR" firstAttribute="width" secondItem="83l-yl-ndR" secondAttribute="height" multiplier="1:1" id="EnN-Rm-V1t"/>
<constraint firstAttribute="bottom" secondItem="BWx-iu-nY0" secondAttribute="bottom" constant="270" id="Gmu-GA-a15"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="centerY" secondItem="wZH-6A-6dN" secondAttribute="centerY" id="HUF-tX-xdo"/>
<constraint firstItem="94R-4Q-SUx" firstAttribute="leading" secondItem="aik-7S-q8v" secondAttribute="leading" constant="30" id="Hif-9z-wed"/>
<constraint firstItem="OLb-WT-tQ0" firstAttribute="centerX" secondItem="ucP-6q-kgn" secondAttribute="centerX" id="LF8-uL-oh2"/>
@@ -265,15 +284,15 @@
<constraint firstItem="wZH-6A-6dN" firstAttribute="width" secondItem="wZH-6A-6dN" secondAttribute="height" multiplier="1:1" id="Mq3-8F-bRK"/>
<constraint firstItem="7KA-Hc-54C" firstAttribute="top" secondItem="wZH-6A-6dN" secondAttribute="bottom" constant="4" id="N5M-Lr-gMP"/>
<constraint firstItem="k4O-MJ-aZd" firstAttribute="centerX" secondItem="RHd-Xx-AyG" secondAttribute="centerX" id="O1e-yh-1dd"/>
<constraint firstItem="wZH-6A-6dN" firstAttribute="leading" secondItem="ucP-6q-kgn" secondAttribute="trailing" constant="44" id="OWU-Aa-pW7"/>
<constraint firstItem="wZH-6A-6dN" firstAttribute="leading" secondItem="ucP-6q-kgn" secondAttribute="trailing" constant="40" id="OWU-Aa-pW7"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="width" secondItem="ZVe-ED-kl7" secondAttribute="height" multiplier="1:1" id="Qyh-QP-HeZ"/>
<constraint firstItem="KcF-jg-Mz2" firstAttribute="leading" secondItem="aik-7S-q8v" secondAttribute="leading" constant="30" id="Rke-2G-beZ"/>
<constraint firstItem="RHd-Xx-AyG" firstAttribute="width" secondItem="RHd-Xx-AyG" secondAttribute="height" multiplier="1:1" id="T9h-Jc-mSP"/>
<constraint firstItem="BWx-iu-nY0" firstAttribute="top" secondItem="83l-yl-ndR" secondAttribute="bottom" constant="4" id="TWl-21-aNy"/>
<constraint firstItem="WFc-cF-80l" firstAttribute="leading" secondItem="ZVe-ED-kl7" secondAttribute="trailing" constant="44" id="TZx-fE-vtq"/>
<constraint firstItem="WFc-cF-80l" firstAttribute="leading" secondItem="ZVe-ED-kl7" secondAttribute="trailing" constant="40" id="TZx-fE-vtq"/>
<constraint firstItem="brS-3x-RcE" firstAttribute="centerX" secondItem="aik-7S-q8v" secondAttribute="centerX" id="XdO-Ar-nOl"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="width" secondItem="fFJ-1w-2f5" secondAttribute="height" multiplier="1:1" id="Z0l-VK-2yG"/>
<constraint firstItem="RHd-Xx-AyG" firstAttribute="leading" secondItem="WFc-cF-80l" secondAttribute="trailing" constant="44" id="aR0-vG-y0w"/>
<constraint firstItem="RHd-Xx-AyG" firstAttribute="leading" secondItem="WFc-cF-80l" secondAttribute="trailing" constant="40" id="aR0-vG-y0w"/>
<constraint firstAttribute="trailing" secondItem="RHd-Xx-AyG" secondAttribute="trailing" constant="30" id="aep-VW-fb6"/>
<constraint firstAttribute="trailing" secondItem="EVp-Sm-Feq" secondAttribute="trailing" id="c5c-iY-hT7"/>
<constraint firstItem="w1W-F8-kDG" firstAttribute="centerX" secondItem="WFc-cF-80l" secondAttribute="centerX" id="eAc-A6-bC1"/>
@@ -281,16 +300,17 @@
<constraint firstItem="w1W-F8-kDG" firstAttribute="top" secondItem="WFc-cF-80l" secondAttribute="bottom" constant="4" id="fdq-SA-t2V"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="top" secondItem="94R-4Q-SUx" secondAttribute="top" id="ftU-GC-kl2"/>
<constraint firstItem="Dse-Ih-U5R" firstAttribute="top" secondItem="ZVe-ED-kl7" secondAttribute="bottom" constant="4" id="gps-mw-vhM"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="leading" secondItem="83l-yl-ndR" secondAttribute="trailing" constant="44" id="hbT-wu-CfZ"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="leading" secondItem="83l-yl-ndR" secondAttribute="trailing" constant="40" id="hbT-wu-CfZ"/>
<constraint firstItem="WFc-cF-80l" firstAttribute="width" secondItem="WFc-cF-80l" secondAttribute="height" multiplier="1:1" id="hbj-Ne-Lm4"/>
<constraint firstItem="83l-yl-ndR" firstAttribute="leading" secondItem="aik-7S-q8v" secondAttribute="leading" constant="30" id="hik-sv-fai"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="leading" secondItem="wZH-6A-6dN" secondAttribute="trailing" constant="44" id="ihK-ZO-1SS"/>
<constraint firstItem="94R-4Q-SUx" firstAttribute="top" secondItem="vcu-MT-d6F" secondAttribute="bottom" constant="45" id="kES-AW-PEh"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="leading" secondItem="wZH-6A-6dN" secondAttribute="trailing" constant="40" id="ihK-ZO-1SS"/>
<constraint firstItem="94R-4Q-SUx" firstAttribute="top" secondItem="vcu-MT-d6F" secondAttribute="bottom" constant="40" id="kES-AW-PEh"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="width" secondItem="ucP-6q-kgn" secondAttribute="height" multiplier="1:1" id="kSM-tE-ZTg"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="width" secondItem="83l-yl-ndR" secondAttribute="width" id="ko6-sh-nUc"/>
<constraint firstItem="r24-bR-0zZ" firstAttribute="centerX" secondItem="fFJ-1w-2f5" secondAttribute="centerX" id="lRc-52-x3D"/>
<constraint firstItem="zRG-Xz-MbP" firstAttribute="centerX" secondItem="94R-4Q-SUx" secondAttribute="centerX" id="nOQ-wi-nav"/>
<constraint firstItem="fFJ-1w-2f5" firstAttribute="width" secondItem="fFJ-1w-2f5" secondAttribute="height" multiplier="1:1" id="ns1-lf-YQG"/>
<constraint firstItem="Jp2-HW-vcX" firstAttribute="top" secondItem="vcu-MT-d6F" secondAttribute="bottom" constant="6" id="pYZ-Gz-Cgr"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="width" secondItem="ucP-6q-kgn" secondAttribute="height" multiplier="1:1" id="q0b-Ok-bD1"/>
<constraint firstAttribute="trailing" secondItem="fFJ-1w-2f5" secondAttribute="trailing" constant="30" id="s7v-x0-Wl5"/>
<constraint firstItem="KcF-jg-Mz2" firstAttribute="top" secondItem="aik-7S-q8v" secondAttribute="top" constant="18" id="tdu-Q3-j07"/>
@@ -298,10 +318,11 @@
<constraint firstItem="RHd-Xx-AyG" firstAttribute="centerY" secondItem="WFc-cF-80l" secondAttribute="centerY" id="tpr-qz-KT0"/>
<constraint firstItem="vcu-MT-d6F" firstAttribute="centerX" secondItem="aik-7S-q8v" secondAttribute="centerX" id="uKM-H9-GFY"/>
<constraint firstItem="ucP-6q-kgn" firstAttribute="width" secondItem="83l-yl-ndR" secondAttribute="width" id="wEN-Jf-FpP"/>
<constraint firstItem="brS-3x-RcE" firstAttribute="top" secondItem="EVp-Sm-Feq" secondAttribute="bottom" constant="-50" id="wy8-b5-lgU"/>
<constraint firstItem="brS-3x-RcE" firstAttribute="top" secondItem="EVp-Sm-Feq" secondAttribute="bottom" constant="-91" id="wy8-b5-lgU"/>
<constraint firstItem="wZH-6A-6dN" firstAttribute="width" secondItem="83l-yl-ndR" secondAttribute="width" id="x5W-Jy-Jg5"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="leading" secondItem="94R-4Q-SUx" secondAttribute="trailing" constant="44" id="xJf-ZK-IiA"/>
<constraint firstItem="ZVe-ED-kl7" firstAttribute="leading" secondItem="94R-4Q-SUx" secondAttribute="trailing" constant="40" id="xJf-ZK-IiA"/>
<constraint firstItem="wZH-6A-6dN" firstAttribute="width" secondItem="wZH-6A-6dN" secondAttribute="height" multiplier="1:1" id="ypx-oz-Dp1"/>
<constraint firstItem="Jp2-HW-vcX" firstAttribute="centerX" secondItem="vcu-MT-d6F" secondAttribute="centerX" id="zyt-f1-lBK"/>
</constraints>
</view>
</subviews>
@@ -336,7 +357,7 @@
<image name="jiare_selected" width="52" height="52"/>
<image name="shajun_normal" width="52.5" height="52.5"/>
<image name="shajun_selected" width="52.5" height="52.5"/>
<image name="xuanduo_bg" width="562.5" height="390.75"/>
<image name="xuanduo_bg" width="375" height="322.5"/>
<image name="xunhuan_noraml" width="104" height="104"/>
<image name="xunhuan_selected" width="52" height="52"/>
<image name="zaolang_normal" width="52" height="52"/>
@@ -14,7 +14,7 @@
{
self.messagetype=@"00";
self.massagelegth=@"12";
self.functionCode=@"13";
self.functionCode=@"0d";
return [NSString stringWithFormat:@"%@%@%@%@%@", self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
@@ -0,0 +1,20 @@
//
// XuanduoSectionHeaderView.h
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XuanduoSectionHeaderView : UIView
+ (instancetype)shareHeaderView;
@property (weak, nonatomic) IBOutlet UIButton *arrowBtn;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,17 @@
//
// XuanduoSectionHeaderView.m
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "XuanduoSectionHeaderView.h"
@implementation XuanduoSectionHeaderView
+ (instancetype)shareHeaderView {
return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([XuanduoSectionHeaderView class]) owner:nil options:nil].lastObject;
}
@end
@@ -0,0 +1,92 @@
<?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>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="XuanduoSectionHeaderView">
<rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="firstSetCell.png" translatesAutoresizingMaskIntoConstraints="NO" id="Bqd-cM-emS">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="GnN-rZ-YOm"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="定时模式" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W3u-gv-UwS">
<rect key="frame" x="18" y="10" width="61.5" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ifishSetCell_back.png" translatesAutoresizingMaskIntoConstraints="NO" id="xEr-D1-d32">
<rect key="frame" x="0.0" y="40" width="375" height="40"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="循环泵" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lXr-Qa-yTh">
<rect key="frame" x="52" y="51" width="46" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xunhuan_big.png" translatesAutoresizingMaskIntoConstraints="NO" id="q8T-oG-WFw">
<rect key="frame" x="18" y="47" width="30" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="R0i-N6-Aaj"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QEn-72-fxs">
<rect key="frame" x="310" y="40" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="WX0-jw-KlJ"/>
<constraint firstAttribute="width" constant="30" id="yYf-qO-owU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" backgroundImage="arrow_up.png"/>
<state key="selected" backgroundImage="arrow_down.png"/>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="Bqd-cM-emS" secondAttribute="trailing" id="6hx-ql-dN8"/>
<constraint firstItem="q8T-oG-WFw" firstAttribute="top" secondItem="Bqd-cM-emS" secondAttribute="bottom" constant="7" id="7bO-zh-Fsl"/>
<constraint firstItem="xEr-D1-d32" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="KhR-7l-Bwh"/>
<constraint firstItem="Bqd-cM-emS" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="Q21-bV-ExP"/>
<constraint firstItem="QEn-72-fxs" firstAttribute="top" secondItem="Bqd-cM-emS" secondAttribute="bottom" id="UUa-hL-dM6"/>
<constraint firstItem="W3u-gv-UwS" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="18" id="WvH-8n-U40"/>
<constraint firstItem="xEr-D1-d32" firstAttribute="top" secondItem="Bqd-cM-emS" secondAttribute="bottom" id="aDx-gM-Dqm"/>
<constraint firstItem="lXr-Qa-yTh" firstAttribute="leading" secondItem="q8T-oG-WFw" secondAttribute="trailing" constant="4" id="bbj-hu-aG9"/>
<constraint firstItem="lXr-Qa-yTh" firstAttribute="centerY" secondItem="q8T-oG-WFw" secondAttribute="centerY" id="cp9-9B-aLv"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="QEn-72-fxs" secondAttribute="trailing" constant="35" id="jcf-A5-gHK"/>
<constraint firstItem="W3u-gv-UwS" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="10" id="k2X-i0-4lm"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="xEr-D1-d32" secondAttribute="trailing" id="kbe-ys-sLn"/>
<constraint firstItem="q8T-oG-WFw" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="18" id="m7n-ot-0YB"/>
<constraint firstAttribute="bottom" secondItem="q8T-oG-WFw" secondAttribute="bottom" constant="7" id="n5w-cn-FwB"/>
<constraint firstItem="Bqd-cM-emS" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="pof-8d-TRa"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="xEr-D1-d32" secondAttribute="bottom" id="yIp-jd-b3J"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections>
<outlet property="arrowBtn" destination="QEn-72-fxs" id="s69-z7-3MO"/>
<outlet property="titleLabel" destination="lXr-Qa-yTh" id="in6-uN-RA7"/>
</connections>
<point key="canvasLocation" x="136.80000000000001" y="149.32533733133434"/>
</view>
</objects>
<resources>
<image name="arrow_down.png" width="75" height="75"/>
<image name="arrow_up.png" width="75" height="75"/>
<image name="firstSetCell.png" width="1080" height="152"/>
<image name="ifishSetCell_back.png" width="1080" height="140"/>
<image name="xunhuan_big.png" width="75" height="75"/>
</resources>
</document>
@@ -0,0 +1,21 @@
//
// XuanduoSelectHeader.h
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XuanduoSelectHeader : UIView
+ (instancetype)shareHeaderView;
@property (weak, nonatomic) IBOutlet UIButton *controlBtn;
- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,29 @@
//
// XuanduoSelectHeader.m
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "XuanduoSelectHeader.h"
@interface XuanduoSelectHeader ()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *label;
@end
@implementation XuanduoSelectHeader
+ (instancetype)shareHeaderView {
return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([XuanduoSelectHeader class]) owner:nil options:nil].lastObject;
}
- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName {
self.imageView.image = [UIImage imageNamed:name];
self.label.text = labelName;
}
@end
@@ -0,0 +1,75 @@
<?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>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="XuanduoSelectHeader">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ifishSetCell_back.png" translatesAutoresizingMaskIntoConstraints="NO" id="Y79-yA-YK5">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="杀菌灯" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15T-Hk-end">
<rect key="frame" x="52" y="11" width="46" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AWf-ci-ZDG">
<rect key="frame" x="310" y="0.0" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="BSn-IJ-pQK"/>
<constraint firstAttribute="width" constant="30" id="RtE-QV-28X"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Button" image="arrow_up.png"/>
<state key="selected" image="arrow_down.png"/>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shajun_big.png" translatesAutoresizingMaskIntoConstraints="NO" id="FHB-eh-cwx">
<rect key="frame" x="18" y="7" width="30" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="wt7-Qr-eyY"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="AWf-ci-ZDG" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="K05-ks-Nmu"/>
<constraint firstItem="Y79-yA-YK5" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="Xed-ko-MEG"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="AWf-ci-ZDG" secondAttribute="trailing" constant="35" id="Y5h-qw-cMO"/>
<constraint firstItem="Y79-yA-YK5" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="gST-eX-J7c"/>
<constraint firstItem="15T-Hk-end" firstAttribute="centerY" secondItem="FHB-eh-cwx" secondAttribute="centerY" id="iKL-10-FRc"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="Y79-yA-YK5" secondAttribute="trailing" id="k1b-ga-ZxG"/>
<constraint firstItem="FHB-eh-cwx" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="18" id="nac-Pm-Unf"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="FHB-eh-cwx" secondAttribute="bottom" constant="7" id="uE5-FC-gtB"/>
<constraint firstItem="Y79-yA-YK5" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="wNy-g6-uXh"/>
<constraint firstItem="15T-Hk-end" firstAttribute="leading" secondItem="FHB-eh-cwx" secondAttribute="trailing" constant="4" id="ytC-rn-ftY"/>
<constraint firstItem="FHB-eh-cwx" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="7" id="yuy-HW-myD"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections>
<outlet property="controlBtn" destination="AWf-ci-ZDG" id="00H-o4-Evv"/>
<outlet property="imageView" destination="FHB-eh-cwx" id="6dI-4d-28Q"/>
<outlet property="label" destination="15T-Hk-end" id="rtd-jg-ouc"/>
</connections>
<point key="canvasLocation" x="162" y="119"/>
</view>
</objects>
<resources>
<image name="arrow_down.png" width="75" height="75"/>
<image name="arrow_up.png" width="75" height="75"/>
<image name="ifishSetCell_back.png" width="1080" height="140"/>
<image name="shajun_big.png" width="75" height="75"/>
</resources>
</document>
@@ -67,6 +67,7 @@
#import "HaveHotCoolWenDuPicview.h"
#import "RuSunLightOrder.h"
#import "RuiMeiSetViewController.h"
#import "Xuanduo2SettingController.h"
//
@interface IfishP2PMonitorController ()<HaveHotCoolWenDuPicviewDelegate>
@@ -87,7 +88,7 @@
BOOL _isStop;//
dispatch_queue_t _xutoMainQueue;
BOOL _isPushNextView; //push下级界面
BOOL _isNewXuanduo; //
}
@property(nonatomic,strong) SetTimeController*SetTimeVC;
@@ -113,6 +114,8 @@
@property (nonatomic,strong) UILabel *nameTitle;
@property (strong, nonatomic) UIView *shutterView;
@property(nonatomic,strong) HaveHotCoolWenDuPicview *xuanduoPicView;
@end
extern BOOL formLogIn;//
@@ -4316,6 +4319,16 @@
[self.navigationController pushViewController:connectVC animated:YES];
}
-(void)didselectXuanduo2SetttngWithData:(DeviceModel *)dmodel
andBackModel:(Xuanduo2Model *)backmodel {
Xuanduo2SettingController *setVC = [[Xuanduo2SettingController alloc] init];
setVC.currentdevice = dmodel;
setVC.dataModel = backmodel;
usleep(50*1000);
[self.navigationController pushViewController:setVC animated:YES];
}
//
-(void)selectXuToAtIndex:(NSIndexPath*)index withbackModel:(XutoBackMsgModel *)backmodel{
@@ -4625,6 +4638,108 @@
}
-(void)selectXuanduo2Index:(NSIndexPath *)index withBackModel:(Xuanduo2Model *)backModel{
if (backModel) {
if (index.row == 3) {
//
manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init];
[[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel];
NSString*switchString=manulModel.description;
manulModel.lightNumber = @"04";
if([[backModel.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"确认关闭循环泵?" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:nil];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
manulModel.switchBtn = @"00";
manulModel.crc16Str = @"0000";
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str];
NSData*manulData=[dataContorl stringToHexData:switchString2];
[[Socketsingleton sharedInstance] soketWriteData:manulData];
}];
[alertController addAction:cancelAction];
[alertController addAction:sureAction];
[self.navigationController presentViewController:alertController animated:YES completion:nil];
return;
}
manulModel.crc16Str = @"0000";
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str];
NSData*manulData=[dataContorl stringToHexData:switchString2];
[[Socketsingleton sharedInstance] soketWriteData:manulData];
}else {
_xuanduoPicView=[[HaveHotCoolWenDuPicview alloc] init];
_xuanduoPicView.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height);
[_xuanduoPicView.sureBtn addTarget:self action:@selector(xuanduoSureBtnClick:) forControlEvents:UIControlEventTouchUpInside];
_isNewXuanduo = YES;
[self.view.window addSubview:_xuanduoPicView];
_xuanduoPicView.wenDuPicviewDelegate = self;
NSString *stateStr =nil;
if ([backModel.status isKindOfClass:[NSNull class]]||!backModel.status ) {
backModel.status = @"0000";
}
stateStr = [backModel.status substringWithRange:NSMakeRange(2, 2)];
[_xuanduoPicView initCateBtnSate:stateStr];
[self heatAction:backModel];
}
}
}
- (void)heatAction:(Xuanduo2Model*)model
{
UInt64 mac=[dataContorl hexToTen:model.heatingTemperature];
NSLog(@"%llu",mac);
float TPlabel=mac/10;
int temp= (int)(TPlabel+0.5);
NSString *stringFloat = [NSString stringWithFormat:@"%d",temp];
NSLog(@"%@",stringFloat);
NSArray*wenDuArr=[_xuanduoPicView.picArr objectAtIndex:0];
for (NSInteger i=0; i<wenDuArr.count; i++) {
NSString*picString=wenDuArr[i];
if ([picString isEqualToString:stringFloat ] ) {
[_xuanduoPicView.pic selectRow:i inComponent:0 animated:NO];
}
}
}
- (void)xuanduoSureBtnClick:(UIButton *)btn {
NSLog(@"%@******** _wenduPicview.picViewResultString",_wenduPicview.picViewResultString);
if (_xuanduoPicView.picViewResultString ==nil) {
[_xuanduoPicView removeFromSuperview];
}else{
JiaReWenDuModel *model=[[JiaReWenDuModel alloc] init];
model.resavemacId = [Socketsingleton sharedInstance].macAddress;
model.sendmacId =[Socketsingleton sharedInstance].macAddress;
int intlowString = [_xuanduoPicView.picViewResultString intValue];
int newIntlowString=intlowString*10;
NSLog(@"%d******** newIntlowString",newIntlowString);
// 16
model.JiaReWenDu=[dataContorl tpIntStringToFourHex:newIntlowString];
model.crc16Code =@"0000";
NSString * hexstring=[NSString stringWithFormat:@"%@%@%@",model.description,model.JiaReWenDu,model.crc16Code];
NSData*data=[dataContorl stringToHexData:hexstring];
[ [Socketsingleton sharedInstance] soketWriteData:data];
}
[_xuanduoPicView removeFromSuperview];
_isNewXuanduo = NO;
}
-(void)songNuoBDMianQueue
{
@@ -4680,7 +4795,11 @@
NSString*switchString1=lightOrder.description;
lightOrder.switchBtn = hotCool;
lightOrder.crc16Str=@"0000";
lightOrder.lightNumber=@"05";
if (_isNewXuanduo) {
lightOrder.lightNumber=@"07";
}else{
lightOrder.lightNumber=@"05";
}
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString1,lightOrder.lightNumber,lightOrder.switchBtn,lightOrder.crc16Str];
NSData*manulData=[dataContorl stringToHexData:switchString2];
@@ -19,8 +19,12 @@
#import "SongNuoBDProtocol.h"
#import "RunSun84Protocol.h"
#import "RuiMeiProtocolModel.h"
#import "Xuanduo2Model.h"
@interface BootomViewSoketBackMasgConreol : NSObject<UIAlertViewDelegate>
@property (nonatomic,strong) Xuanduo2Model *dataModel;
@interface BootomViewSoketBackMasgConreol : NSObject
//获取温度
+(NSString*)getTempWithSoketData:(NSData *)data;
+(NSString *)getTempNewWayWithSoketData:(NSData *)data adddeviceType:(NSString *)type;
@@ -42,6 +46,11 @@ indexPath;
+(void)XuToControlCommandSelectorWithBackModel73:(XutoBackMsgModel *)model atindexPath:(NSIndexPath *)
indexPath;
// 新绚多
+(void)XuTo2ControlCommandSelectorWithBackModel73:(Xuanduo2Model *)model atindexPath:(NSIndexPath *)
indexPath;
+(void)FourControlCommandSelectorWithBackModel85:(FourControlbackMassge *)model atindexPath:(NSIndexPath *)indexPath;
@@ -9,6 +9,7 @@
#import "BootomViewSoketBackMasgConreol.h"
#import "IfishDeviceInfo.h"
#import "RuSunGuiDeng.h"
#import "XuanduoHuliModel.h"
@implementation BootomViewSoketBackMasgConreol
@@ -88,6 +89,8 @@
//
str=[str substringWithRange:NSMakeRange(148,IFISH_TEMPERATURE_BYTE2)];
}else if ([type isEqualToString:DECICE_TYPE_XUANDUO2F]){
str=[str substringWithRange:NSMakeRange(60,IFISH_TEMPERATURE_BYTE2)];
}
UInt64 mac=[dataContorl hexToTen:str];
@@ -913,6 +916,110 @@ indexPath{
}
//
+(void)XuTo2ControlCommandSelectorWithBackModel73:(Xuanduo2Model *)model atindexPath:(NSIndexPath *)
indexPath {
NSInteger index= indexPath.row - 3;
manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init];
[[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel];
NSString*switchString=manulModel.description;
if (index == 0) { //
manulModel.lightNumber = @"04";
if([[model.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 1){ //
manulModel.lightNumber = @"01";
if([[model.gasPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 2){ //1
manulModel.lightNumber = @"02";
if([[model.light1 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 3){ //2
manulModel.lightNumber = @"03";
if([[model.light2 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 4){ //
manulModel.lightNumber = @"06";
if([[model.waveMakingPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 5){ //
manulModel.lightNumber = @"05";
if([[model.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
manulModel.switchBtn = @"01";
}else{
manulModel.switchBtn = @"00";
}
}else if (index == 6) { //
XuanduoHuliModel *huliModel = [[XuanduoHuliModel alloc] init];
huliModel.sendmacId = [Socketsingleton sharedInstance].macAddress;
huliModel.resavemacId = [Socketsingleton sharedInstance].macAddress;
NSString *switchString = huliModel.description;
if([[model.huliLight substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{
huliModel.switchBtn = @"01";
}else{
huliModel.switchBtn = @"00";
}
huliModel.crc16Str=@"0000";// CRC16验证码
NSString *switchString2 = [NSString stringWithFormat:@"%@%@%@",switchString,huliModel.switchBtn,huliModel.crc16Str];
NSData *manulData=[dataContorl stringToHexData:switchString2];
[[Socketsingleton sharedInstance] soketWriteData:manulData];
return;
}
manulModel.crc16Str = @"0000";
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString,manulModel.lightNumber,manulModel.switchBtn,manulModel.crc16Str];
NSData*manulData=[dataContorl stringToHexData:switchString2];
[[Socketsingleton sharedInstance] soketWriteData:manulData];
}
@end
@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
//竖屏水族箱 底部view
#import "DeviceModel.h"
#import "Xuanduo2Model.h"
#import "Socketsingleton.h"
#import "BootomViewSoketBackMasgConreol.h"
#import "DeviceCommunicateDataUnity.h"
@@ -47,6 +48,9 @@
withData:(DeviceModel *)dmodel
addMassglength:(NSUInteger) bufferlenth;
// 新绚多设置页面
-(void)didselectXuanduo2SetttngWithData:(DeviceModel *)dmodel
andBackModel:(Xuanduo2Model *)backmodel;
-(void)cameraBindDeviceSuccess;
@@ -58,6 +62,8 @@
-(void)selectXuToAtIndex:(NSIndexPath*)index withbackModel:(XutoBackMsgModel *)backmodel ;
-(void)selectXuanduo2Index:(NSIndexPath *)index withBackModel:(Xuanduo2Model *)backModel;
//对应松诺加热棒
-(void)slectSongNuoInde:(NSIndexPath*)index withBackModel:(SongNuoBackMassage *)backModel;
@@ -148,6 +154,8 @@
@property(nonatomic,strong) RunSun84Protocol *ruSun84Back;
@property (nonatomic, strong) RuiMeiProtocolModel *ruiMeiBack;
@property(nonatomic,strong) SongNuoBDProtocol *songNuoBDBack;
@property(nonatomic,strong) Xuanduo2Model *xuanduoBack;
-(void)setTabViewWithFrame:(CGRect)frame;
@@ -29,8 +29,14 @@
#import "XuToControlName.h"
#import "RuiMeiCHNameCustom.h"
#import "RuiMeiCHControl.h"
#import "Xuanduo2DataUtility.h"
#import "NSString+Add.h"
#define ktempTag 600
@implementation MonitorBootmView
{
NSTimer *_switchTimer;
}
-(id)initWithFrame:(CGRect)frame
{
@@ -610,7 +616,9 @@
} else if ([self.device.type isEqualToString:DECICE_TYPE_RUIMEI]) {
return 3 + 5;
} else {
} else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
return 3 + self.device.controlAmount.integerValue + 1;
}else {
if (self.device.controlAmount.integerValue ==5) {
@@ -690,7 +698,30 @@
withData:self.device
addMassglength:self.dataLength];
}else{
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
if (!_xuanduoBack) {
[self makeToast:@"暂未连接"];
return;
}
if (indexPath.row == 1) {
FishControlSecondCell *cell = [self.collectionView viewWithTag:ktempTag];
if (!cell || [cell.templabel.text containsString:@"kwh"]) {
return;
}
UInt64 mac = [dataContorl hexToTen:_xuanduoBack.electricity];
NSString *stringTemp = [NSString stringWithFormat:@"%llukwh",mac];
cell.templabel.font = [UIFont systemFontOfSize:37];
cell.templabel.textColor = RGB(253, 188, 63);
[cell.templabel setAttributedText:[NSString ls_changeFontAndColor:[UIFont systemFontOfSize:17] Color:nil TotalString:stringTemp SubStringArray:@[@"kwh"]]];
if (!_switchTimer) {
_switchTimer = [NSTimer timerWithTimeInterval:3.0 target:self selector:@selector(changeTemp) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:_switchTimer forMode:NSRunLoopCommonModes];
}
}else if(indexPath.row == 2) {
[self.MonitorBottomDelegate didselectXuanduo2SetttngWithData:self.device andBackModel:_xuanduoBack];
}
}
else{
int controlAmount=[self.device.controlAmount intValue];
switch (controlAmount) {
@@ -894,6 +925,20 @@
}
[self makeToastActivity];
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
//
if (!_xuanduoBack) {
[self makeToast:@"暂未连接"];
return;
}
if (indexPath.row == 10 || indexPath.row == 3) {
//
[self.MonitorBottomDelegate selectXuanduo2Index:indexPath withBackModel:_xuanduoBack];
}else{
[BootomViewSoketBackMasgConreol XuTo2ControlCommandSelectorWithBackModel73:_xuanduoBack atindexPath:indexPath];
}
[self makeToastActivity];
}else{
int controlAmount=[self.device.controlAmount intValue];
@@ -1062,6 +1107,25 @@
}
- (void)changeTemp {
[self setTemperature];
[_switchTimer invalidate];
_switchTimer = nil;
}
- (void)setTemperature {
FishControlSecondCell *cell = [self.collectionView viewWithTag:ktempTag];
if (!cell) {
return;
}
UInt64 mac = [dataContorl hexToTen:_xuanduoBack.waterTemperature];
NSLog(@"%llu",mac);
//float TPlabel=mac/10+(mac%10)*0.1;
float temp = mac/10.0;
NSString *stringTemp = [NSString stringWithFormat:@"%.1f",temp];
[cell setTemWith:stringTemp];
}
#pragma mark 加载脚步视图
//- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
@@ -1116,7 +1180,7 @@
//
FishControlSecondCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"FishControlSecondCell" forIndexPath:indexPath];
cell.tag = ktempTag;
cell.backgroundColor = [UIColor whiteColor];
[cell setTemWith:self.temperature];
@@ -1179,6 +1243,14 @@
[cell setSongNuoBDControBtnImg:self.btnImgArr addArr:self.btnOnImgArr atIndex:indexPath addBackModel:_songNuoBDBack];
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
if (!_xuanduoBack) {
cell.controBtnImg.image = self.btnImgArr[indexPath.row - 3];
[self makeToast:@"连接设备中..."];
}else {
[cell setXuanduo2ControBtnImg:self.btnImgArr addArr:self.btnOnImgArr atIndex:indexPath addBackModel:_xuanduoBack];
}
}else{
int controlAmount=[self.device.controlAmount intValue];
@@ -1395,7 +1467,27 @@
LXImageWithImageName(@"bootview_co2_on"),
LXImageWithImageName(@"bootview_heat_on")];
} else{
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
self.btnNameArr = @[@"循环泵",@"增氧泵",@"灯光1",@"灯光2",@"造浪泵",@"杀菌灯",@"护理灯",@"加热棒"];
self.btnImgArr = @[[UIImage imageNamed:@"xunhuan_noraml"],
[UIImage imageNamed:@"zengyang_noraml"],
[UIImage imageNamed:@"dengguang_normal"],
[UIImage imageNamed:@"dengguang_normal"],
[UIImage imageNamed:@"zaolang_normal"],
[UIImage imageNamed:@"shajun_normal"],
[UIImage imageNamed:@"huli_noraml"],
[UIImage imageNamed:@"jiare_normal"]];
self.btnOnImgArr = @[[UIImage imageNamed:@"xunhuan_selected"],
[UIImage imageNamed:@"zengyang_selected"],
[UIImage imageNamed:@"dengguang_selected"],
[UIImage imageNamed:@"dengguang_selected"],
[UIImage imageNamed:@"zaolang_selectd"],
[UIImage imageNamed:@"shajun_selected"],
[UIImage imageNamed:@"huli_selected"],
[UIImage imageNamed:@"jiare_selected"]];
}else{
int controlAmount=[self.device.controlAmount intValue];
@@ -1702,6 +1794,14 @@
addMassglength:string1.length];
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F]){
//
if (!_xuanduoBack) {
_xuanduoBack = [[Xuanduo2Model alloc] init];
}
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data];
self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO2F];
[self.collectionView reloadData];
}else{
int controlAmount=[devicemoel.controlAmount intValue];
@@ -17,6 +17,7 @@
#import "SongNuoBDProtocol.h"
#import "RunSun84Protocol.h"
#import "RuiMeiProtocolModel.h"
#import "Xuanduo2Model.h"
@interface FishControlFourthCell : UICollectionViewCell
@@ -59,6 +60,12 @@
atIndex:(NSIndexPath *)indexPath
addBackModel:(XutoBackMsgModel *)model;
//新绚多
-(void)setXuanduo2ControBtnImg:(NSArray *)imgOffArr
addArr:(NSArray *)imgOnArr
atIndex:(NSIndexPath *)indexPath
addBackModel:(Xuanduo2Model*)model;
//松诺
-(void)setSongNuoControlBtnImg:(NSArray *)imgOffArr
@@ -88,4 +95,6 @@
atIndex:(NSIndexPath *)indexPath
addBackModel:(RuiMeiProtocolModel*)model;
@end
@@ -251,6 +251,63 @@
}
}
-(void)setXuanduo2ControBtnImg:(NSArray *)imgOffArr
addArr:(NSArray *)imgOnArr
atIndex:(NSIndexPath *)indexPath
addBackModel:(Xuanduo2Model*)model {
NSInteger index = indexPath.row - 3;
if (index == 0) {
NSString*stateString=[model.waterPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 1){
NSString*stateString=[model.gasPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 2){
NSString*stateString=[model.light1 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 3){
NSString*stateString=[model.light2 substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 4){
NSString*stateString=[model.waveMakingPump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 5){
NSString*stateString=[model.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 6){
NSString*stateString=[model.huliLight substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}else if (index == 7){
NSString*stateString=[model.heatStatus substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr];
}
}
@@ -38,7 +38,7 @@
formattemp = @"暂无数据";
}
self.templabel.font = [UIFont systemFontOfSize:17];
NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:formattemp ];
[attributedString addAttribute:NSForegroundColorAttributeName value:RGB(253, 188, 63) range:NSMakeRange(0,[formattemp length])];
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

@@ -0,0 +1,21 @@
//
// ReadTimerModel.h
// Ifish
//
// Created by Alex on 2019/5/3.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "baseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ReadTimerModel : baseModel
/// 灯编号
@property(nonatomic,copy)NSString*selectorNumber;
@property(nonatomic,copy)NSString*crc16str;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
//
// ReadTimerModel.m
// Ifish
//
// Created by Alex on 2019/5/3.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "ReadTimerModel.h"
@implementation ReadTimerModel
- (NSString *)description
{
self.messagetype=@"00";
self.massagelegth=@"12";
self.functionCode=@"16";
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
}
@end
@@ -0,0 +1,22 @@
//
// SetTimerModel.h
// Ifish
//
// Created by Alex on 2019/5/2.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "baseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface SetTimerModel : baseModel
@property(nonatomic,copy)NSString*selectorNumber;
@property(nonatomic,copy)NSString*selectorTime;
/// 控制组编号
@property(nonatomic,copy)NSString*groupNumber;
@property(nonatomic,copy)NSString*isOn;//时间定时器开关状态
@property(nonatomic,copy)NSString*crc16str;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,20 @@
//
// SetTimerModel.m
// Ifish
//
// Created by Alex on 2019/5/2.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "SetTimerModel.h"
@implementation SetTimerModel
- (NSString *)description
{
self.messagetype=@"00";
self.massagelegth=@"18";
self.functionCode=@"15";
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
}
@end
+7
View File
@@ -25,6 +25,8 @@
@property(nonatomic)NSInteger compennent;
@property(nonatomic,copy)NSString *startString;
@property(nonatomic,copy)NSString *endString;
@property(nonatomic,copy)NSString *startString1;
@property(nonatomic,copy)NSString *endString1;
@property(nonatomic,copy)NSString *resultString;
@property(nonatomic,strong)UIImageView *backgroundImage;
@@ -34,4 +36,9 @@
@property(nonatomic,strong)UILabel *endLabel;
@property(nonatomic,assign)BOOL isNewXuanduo;
@property(nonatomic,assign)BOOL haveDelected;
@end
+68 -15
View File
@@ -9,6 +9,7 @@
#import "MydatePickerView.h"
#define kScreenSize [UIScreen mainScreen].bounds.size
#include "AppDelegate.h"
@implementation MydatePickerView
-(instancetype)initWithFrame:(CGRect)frame{
self=[super initWithFrame:frame];
@@ -22,7 +23,8 @@
_backgroundImage.image=[UIImage imageNamed:@"Box"];
_backgroundImage.userInteractionEnabled=YES;
[self addSubview:_backgroundImage];
_backgroundImage.layer.masksToBounds=YES;
_backgroundImage.layer.cornerRadius=10;
UILabel*title=[[UILabel alloc]initWithFrame:CGRectMake(10,10, _backgroundImage.frame.size.width-10*2, 20)];
title.text=@"时间设置";
@@ -52,15 +54,6 @@
_cancleButton=[UIButton buttonWithType:UIButtonTypeCustom];
_cancleButton.backgroundColor=[UIColor lightGrayColor];
CGFloat wdspace=40;
_cancleButton.frame=CGRectMake(40,_picView.frame.origin.y + _picView.frame.size.height - 10, (_backgroundImage.frame.size.width-3*wdspace)/2, 30);
[_cancleButton setTitle:@" 取消" forState:UIControlStateNormal];
_cancleButton.layer.masksToBounds=YES;
_cancleButton.layer.cornerRadius=5;
_cancleButton.userInteractionEnabled=YES;
//[_backgroundImage addSubview:_cancleButton];
_sureButton
=[UIButton buttonWithType:UIButtonTypeCustom];
@@ -81,6 +74,16 @@
[_backgroundImage addSubview:_sureButton];
_cancleButton.frame=CGRectMake(0,0,0,0);
[_cancleButton setTitle:@"删除" forState:UIControlStateNormal];
// _cancleButton.layer.masksToBounds=YES;
// _cancleButton.layer.cornerRadius=5;
// _cancleButton.userInteractionEnabled=YES;
// _cancleButton.backgroundColor = [UIColor purpleColor];
_cancleButton.hidden = YES;
[_backgroundImage addSubview:_cancleButton];
[self initData];
UITapGestureRecognizer *sigleTap=[[UITapGestureRecognizer alloc] init ];
@@ -101,6 +104,46 @@
return self;
}
- (void)setIsNewXuanduo:(BOOL)isNewXuanduo {
_isNewXuanduo = isNewXuanduo;
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)];
label1.text=@"小时";
label1.font=[UIFont systemFontOfSize:15];
label1.textAlignment=NSTextAlignmentCenter;
[_backgroundImage addSubview:label1];
UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(12+label1.frame.size.width+2,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)];
label2.text=@"分钟";
label2.font=[UIFont systemFontOfSize:15];
label2.textAlignment=NSTextAlignmentCenter;
[_backgroundImage addSubview:label2];
UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(label2.frame.origin.x+label2.frame.size.width+ 4,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)];
label3.text=@"小时";
label3.font=[UIFont systemFontOfSize:15];
label3.textAlignment=NSTextAlignmentCenter;
[_backgroundImage addSubview:label3];
UILabel *label4 = [[UILabel alloc] initWithFrame:CGRectMake(label3.frame.origin.x+label3.frame.size.width+2,_startLabel.frame.origin.y+30, _picView.frame.size.width/4, 20)];
label4.text=@"分钟";
label4.font=[UIFont systemFontOfSize:15];
label4.textAlignment=NSTextAlignmentCenter;
[_backgroundImage addSubview:label4];
[self initData];
}
- (void)setHaveDelected:(BOOL)haveDelected {
_haveDelected = haveDelected;
_cancleButton.hidden = NO;
[_sureButton setBackgroundImage:[UIImage imageNamed:@"surebtn_bg"] forState:UIControlStateNormal];
[_cancleButton setBackgroundImage:[UIImage imageNamed:@"deletebtn_bg"] forState:UIControlStateNormal];
CGRect pickerframe = _picView.frame;
pickerframe.origin.y = pickerframe.origin.y + 8;
_picView.frame = pickerframe;
CGRect frame = _sureButton.frame;
frame.size.width = frame.size.width/2.0;
_sureButton.frame = frame;
_sureButton.layer.cornerRadius=0;
_cancleButton.frame = CGRectMake(CGRectGetMaxX(frame), frame.origin.y, frame.size.width, frame.size.height);
}
-(void)dissmissView{
[self removeFromSuperview];
@@ -108,17 +151,23 @@
}
-(void)initData{
_dataArr=@[@[@"0:00",@"0:30",@"1:00",@"1:30",@"2:00",@"2:30",@"3:00",@"3:30",@"4:00",@"4:30",@"5:00",@"5:30",@"6:00",@"6:30",@"7:00",@"7:30",@"8:00",@"8:30",@"9:00",@"9:30",@"10:00",@"10:30",@"11:00",@"11:30",@"12:00",@"12:30",@"13:00",@"13:30",@"14:00",@"14:30",@"15:00",@"15:30",@"16:00",@"16:30",@"17:00",@"17:30",@"18:00",@"18:30",@"19:00",@"19:30",@"20:00",@"20:30",@"21:00",@"21:30",@"22:00",@"22:30",@"23:00",@"23:30"],@[@"0:29",@"0:59",@"1:29",@"1:59",@"2:29",@"2:59",@"3:29",@"3:59",@"4:29",@"4:59",@"5:29",@"5:59",@"6:29",@"6:59",@"7:29",@"7:59",@"8:29",@"8:59",@"9:29",@"9:59",@"10:29",@"10:59",@"11:29",@"11:59",@"12:29",@"12:59",@"13:29",@"13:59",@"14:29",@"14:59",@"15:29",@"15:59",@"16:29",@"16:59",@"17:29",@"17:59",@"18:29",@"18:59",@"19:29",@"19:59",@"20:29",@"20:59",@"21:29",@"21:59",@"22:29",@"22:59",@"23:29",@"23:59",]];
if (_isNewXuanduo) {
_startString = _startString1 = _endString = _endString1 = @"00";
_dataArr = @[@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14"
,@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31",@"32",@"33",@"34",@"35",@"36",@"37",@"38",@"39",@"40",@"41",@"42",@"43",@"44",@"45",@"46",@"47",@"48",@"49",@"50",@"51",@"52",@"53",@"54",@"55",@"56",@"57",@"58",@"59"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23"],@[@"00",@"01",@"02",@"03",@"04",@"05",@"06",@"07",@"08",@"09",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31",@"32",@"33",@"34",@"35",@"36",@"37",@"38",@"39",@"40",@"41",@"42",@"43",@"44",@"45",@"46",@"47",@"48",@"49",@"50",@"51",@"52",@"53",@"54",@"55",@"56",@"57",@"58",@"59"]];
}else {
_dataArr=@[@[@"0:00",@"0:30",@"1:00",@"1:30",@"2:00",@"2:30",@"3:00",@"3:30",@"4:00",@"4:30",@"5:00",@"5:30",@"6:00",@"6:30",@"7:00",@"7:30",@"8:00",@"8:30",@"9:00",@"9:30",@"10:00",@"10:30",@"11:00",@"11:30",@"12:00",@"12:30",@"13:00",@"13:30",@"14:00",@"14:30",@"15:00",@"15:30",@"16:00",@"16:30",@"17:00",@"17:30",@"18:00",@"18:30",@"19:00",@"19:30",@"20:00",@"20:30",@"21:00",@"21:30",@"22:00",@"22:30",@"23:00",@"23:30"],@[@"0:29",@"0:59",@"1:29",@"1:59",@"2:29",@"2:59",@"3:29",@"3:59",@"4:29",@"4:59",@"5:29",@"5:59",@"6:29",@"6:59",@"7:29",@"7:59",@"8:29",@"8:59",@"9:29",@"9:59",@"10:29",@"10:59",@"11:29",@"11:59",@"12:29",@"12:59",@"13:29",@"13:59",@"14:29",@"14:59",@"15:29",@"15:59",@"16:29",@"16:59",@"17:29",@"17:59",@"18:29",@"18:59",@"19:29",@"19:59",@"20:29",@"20:59",@"21:29",@"21:59",@"22:29",@"22:59",@"23:29",@"23:59",]];
}
}
-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
NSArray *rowArray=[[NSArray alloc] init];
rowArray=_dataArr[component];
return rowArray.count;
}
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
return 2;
return _isNewXuanduo?4:2;
}
-(NSString*)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
@@ -137,6 +186,10 @@
_endString=_dataArr[1][_row];
}else if (component==2){
_startString1=_dataArr[2][_row];
}else if (component==3){
_endString1=_dataArr[3][_row];
}
// [_picView selectRow:row inComponent:component animated:YES];
@@ -151,7 +204,7 @@
}
-(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{
return pickerView.frame.size.width/2;
return pickerView.frame.size.width/(_isNewXuanduo?4:2);
}