绚多45f界面初步开发

This commit is contained in:
kai60
2022-05-05 10:07:20 +08:00
parent 75a7f09cac
commit 134f8a192b
33 changed files with 1959 additions and 200 deletions
@@ -17,7 +17,9 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.edgesForExtendedLayout=UIRectEdgeNone;
if (@available(iOS 15.0, *)) {
self.tableView.sectionHeaderTopPadding = 0;
}
[self setNav];
@@ -0,0 +1,21 @@
//
// TimerTypeTableViewCell.h
// Ifish
//
// Created by 祝发冬 on 2022/5/3.
// Copyright © 2022 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TimerTypeTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *timerbtn;
@property (weak, nonatomic) IBOutlet UIButton *recoverybtn;
@property (weak, nonatomic) IBOutlet UIButton *cyclebtn;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,31 @@
//
// TimerTypeTableViewCell.m
// Ifish
//
// Created by 祝发冬 on 2022/5/3.
// Copyright © 2022 lianlian. All rights reserved.
//
#import "TimerTypeTableViewCell.h"
@implementation TimerTypeTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
[self.timerbtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
make.width.mas_equalTo(120); }];
self.timerbtn.titleEdgeInsets=UIEdgeInsetsMake(10, -90, 10, 0);
self.timerbtn.titleLabel.font=[UIFont systemFontOfSize:15];
}
- (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="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="40" id="KGk-i7-Jjw" customClass="TimerTypeTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<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="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N2e-hF-SlL" userLabel="timerbtn">
<rect key="frame" x="10" y="2" width="136" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="selectedImage" title="定时模式" titleAlignment="automatic"/>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xbU-qP-hXX" userLabel="recoverybtn">
<rect key="frame" x="203" y="-2" width="136" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="selectedImage" title="自恢复模式" titleAlignment="automatic"/>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yqV-t4-x09" userLabel="cyclebtn">
<rect key="frame" x="113" y="5" width="136" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="selectedImage" title="循环模式" titleAlignment="automatic"/>
</button>
</subviews>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="cyclebtn" destination="yqV-t4-x09" id="Ptm-mX-wAk"/>
<outlet property="recoverybtn" destination="xbU-qP-hXX" id="AG5-Cy-9Th"/>
<outlet property="timerbtn" destination="N2e-hF-SlL" id="6Nb-dL-mwl"/>
</connections>
<point key="canvasLocation" x="137.68115942028987" y="68.973214285714278"/>
</tableViewCell>
</objects>
<resources>
<image name="selectedImage" width="30" height="30"/>
</resources>
</document>
@@ -1047,7 +1047,7 @@
[self.navigationController pushViewController:_settingVC animated:YES];
}
else if (self.dataModel.gasPump.length) {
Xuanduo2SettingController *_settingVC = [[Xuanduo2SettingController alloc] init];
XuanduoSettingController *_settingVC = [[XuanduoSettingController alloc] init];
_settingVC.currentdevice = self.currentDevice;
_settingVC.dataModel = self.dataModel;
[self.navigationController pushViewController:_settingVC animated:YES];
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -54,6 +52,7 @@
<state key="selected" backgroundImage="arrow_down.png"/>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<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"/>
@@ -74,7 +73,6 @@
<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"/>
@@ -83,10 +81,10 @@
</view>
</objects>
<resources>
<image name="arrow_down.png" width="75" height="75"/>
<image name="arrow_up.png" width="75" height="75"/>
<image name="arrow_down.png" width="108" height="108"/>
<image name="arrow_up.png" width="108" height="108"/>
<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"/>
<image name="xunhuan_big.png" width="108" height="108"/>
</resources>
</document>
@@ -10,10 +10,11 @@
NS_ASSUME_NONNULL_BEGIN
@interface XuanduoSelectHeader : UIView
@interface XuanduoSelectHeader : UIImageView
+ (instancetype)shareHeaderView;
@property (weak, nonatomic) IBOutlet UIButton *controlBtn;
@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName;
@end
@@ -20,7 +20,11 @@
return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([XuanduoSelectHeader class]) owner:nil options:nil].lastObject;
}
-(void)awakeFromNib
{
self.userInteractionEnabled=YES;
}
- (void)configWithImageName:(NSString *)name labelName:(NSString *)labelName {
self.imageView.image = [UIImage imageNamed:name];
self.label.text = labelName;
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -42,6 +40,7 @@
</constraints>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<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"/>
@@ -57,8 +56,8 @@
<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="backImageView" destination="Y79-yA-YK5" id="fhz-RY-RVO"/>
<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"/>
@@ -67,9 +66,9 @@
</view>
</objects>
<resources>
<image name="arrow_down.png" width="75" height="75"/>
<image name="arrow_up.png" width="75" height="75"/>
<image name="arrow_down.png" width="108" height="108"/>
<image name="arrow_up.png" width="108" height="108"/>
<image name="ifishSetCell_back.png" width="1080" height="140"/>
<image name="shajun_big.png" width="75" height="75"/>
<image name="shajun_big.png" width="108" height="108"/>
</resources>
</document>
@@ -28,6 +28,7 @@
#import "NSString+Add.h"
#import "XuToControlName.h"
#import "UserExtendataArchaver.h"
#import "XuanduoTimerSettingViewController.h"
#define kBtnTag 500
#define kSwitchBtnTag 600
@@ -124,9 +125,9 @@ static NSString *setTimerflag = @"SetTimerCell";
- (void)setupTable {
_titieArr = @[@"预警设置",@"喂鱼设置",@"温度校准",@"功能说明"];
_titieArr = @[@"定时设置",@"喂鱼设置",@"温度校准",@"功能说明"];
_imgArr = @[@"定时",@"喂鱼",@"温度校准",@"功能说明"];
_imgArr = @[@"定时",@"喂鱼",@"温度校准",@"功能说明 "];
@@ -144,8 +145,15 @@ static NSString *setTimerflag = @"SetTimerCell";
[self.timeDic setObject:dataArr forKey:_titieArr[i]];
}
self.tableView.backgroundColor=COLOR_MIAN;
self.tableView.estimatedRowHeight=0;
self.tableView.estimatedSectionFooterHeight=0;
self.tableView.estimatedSectionHeaderHeight=0;
self.tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
self.tableView.separatorInset=UIEdgeInsetsMake(0, 15, 0, 15);
[self.tableView registerNib:[UINib nibWithNibName:temperatureCellid bundle:nil] forCellReuseIdentifier:temperatureCellid];
[self.tableView registerNib:[UINib nibWithNibName:changeWaterCellid bundle:nil] forCellReuseIdentifier:changeWaterCellid];
[self.tableView registerNib:[UINib nibWithNibName:addCellid bundle:nil] forCellReuseIdentifier:addCellid];
@@ -165,16 +173,9 @@ static NSString *setTimerflag = @"SetTimerCell";
return 2;
}
if (section - 2 < _titieArr.count) {
NSArray *dataArr = [self.timeDic objectForKey:_titieArr[section-2]];
return dataArr.count;
}
else
{
if ([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
return 1;
}
return 1;
}
return 0;
}
@@ -183,6 +184,9 @@ static NSString *setTimerflag = @"SetTimerCell";
TemperatureSetCell *cell = [tableView dequeueReusableCellWithIdentifier:temperatureCellid];
TemperatureSetModel *model=[[TemperatureSetModel alloc]init];
model.title = @"预警设置";
cell.icon.hidden=NO;
cell.icon.image=[UIImage imageNamed:@"预警"];
cell.titileLabelLayout.constant=40;
cell.titleLabel.text = model.title;
NSLog(@"wendu str = %@",_wenduString);
model.temperatureLabel = _wenduString;
@@ -235,7 +239,9 @@ static NSString *setTimerflag = @"SetTimerCell";
cell.huanshuiDaylabel.text=[NSString stringWithFormat:@"%ld天",(long)self.waterInfmodel.remindcycle];
}
cell.icon.hidden=NO;
cell.icon.image=[UIImage imageNamed:@"换水"];
cell.titileLabelLayout.constant=40;
return cell;
@@ -363,22 +369,10 @@ static NSString *setTimerflag = @"SetTimerCell";
return 50;
}
}else if (indexPath.section - 2 <_titieArr.count) {
NSArray *dataArr = [self.timeDic objectForKey:_titieArr[indexPath.section-2]];
BOOL havePlus = [dataArr containsObject:plusflag];
if (_selectSection == indexPath.section) {
if (havePlus && indexPath.row == dataArr.count - 1) {
return 80;
}else{
return 50;
}
}else {
return 0;
}
}
else if(indexPath.section - 2 ==_titieArr.count&&[self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
return 50;
return 0;
}
return 0;
}
@@ -386,22 +380,11 @@ static NSString *setTimerflag = @"SetTimerCell";
#pragma mark tableView 头视图和脚视图
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == 0) {
return 5;
}else if (section == 2){
return 0;
}else if (section >1){
return 40;
}else if (section == 3){
return 40;
}else if (section == 4){
return 40;
}else if (section == 5){
return [self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]?0:40;
}else if (section == 6){
return 40;
}else if (section == 7){
return 40;
}else {
return CGFLOAT_MIN;
}else{
return 0;
}
}
@@ -411,75 +394,42 @@ static NSString *setTimerflag = @"SetTimerCell";
UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
}else if(section == 2){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}else if(section == 3){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}else if(section == 4){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}else if(section == 5){
if ([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
}
else
{
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}
}else if(section == 6){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}else if(section == 7){
}else if(section > 1){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) {
headerView.controlBtn.selected = YES;
}
[headerView.controlBtn setImage:[UIImage imageNamed:@"arrow_right"] forState:UIControlStateNormal];
// headerView.backImageView.image=[UIImage imageNamed:@"矩形"];
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView;
}else
{
UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
}
return nil;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
CGFloat height=0;
if (section==1)
{
height=40;
}
return height;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
}
#pragma mark tableView 点击事件
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -571,64 +521,12 @@ static NSString *setTimerflag = @"SetTimerCell";
}
#pragma mark - cell的折叠
- (void)foldAction:(UIButton *)btn {
if (_selectSection == btn.tag - kBtnTag) {
_selectSection = -1;
[self.tableView reloadData];
}else {
_selectSection = btn.tag - kBtnTag;
ReadTimerModel *readModel = [[ReadTimerModel alloc] init];
//杀菌不定时
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]&&(_selectSection - 2)==2)
{
readModel.functionCode=@"19";//读取
}
else
{
readModel.functionCode=@"16";
}
readModel.sendmacId =self.currentdevice.macAddress;
readModel.resavemacId = self.currentdevice.macAddress;
readModel.crc16str=@"0000";
switch (_selectSection - 2) {
case 0: //循环泵 或 照明
readModel.selectorNumber = @"04";
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
readModel.selectorNumber=@"01";
}
break;
case 1: //增氧
readModel.selectorNumber = @"01";
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
readModel.selectorNumber=@"02";
}
break;
case 2: //灯光1
readModel.selectorNumber = @"02";
if([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
readModel.selectorNumber=@"03";
}
break;
case 3: //灯光2
readModel.selectorNumber = @"03";
break;
case 4: //造浪泵
readModel.selectorNumber = @"06";
break;
case 5: // 杀菌灯
readModel.selectorNumber = @"05";
break;
default:
break;
}
NSString*readString=[NSString stringWithFormat:@"%@%@%@",readModel.description,readModel.selectorNumber,readModel.crc16str];
NSData*readData=[dataContorl stringToHexData:readString];
[[Socketsingleton sharedInstance] soketWriteData:readData];
[_indicatorView startAnimating];
}
- (void)foldAction:(UIButton *)btn
{
XuanduoTimerSettingViewController *_settingVC = [[XuanduoTimerSettingViewController alloc] init];
_settingVC.currentdevice = self.currentdevice;
_settingVC.dataModel = self.dataModel;
[self.navigationController pushViewController:_settingVC animated:YES];
}
- (void)switchAction:(UIButton *)btn {
@@ -0,0 +1,27 @@
//
// Xuanduo2SettingController.h
// Ifish
//
// Created by Alex on 2019/4/28.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "FatherController.h"
#import "IfishDeviceInfo.h"
#include "xuanduo3fModel.h"
NS_ASSUME_NONNULL_BEGIN
@class Xuanduo2Model;
@interface XuanduoTimerSettingViewController : FatherController
@property (nonatomic,strong) UIActivityIndicatorView*indicatorView;
@property (nonatomic ,strong) id dataModel;
@property(nonatomic,strong) DeviceModel* currentdevice;
- (void)refreshWithData:(id)model;
@end
NS_ASSUME_NONNULL_END