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
@@ -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>