联系我们字体修改和关联宠物笼的设置问题修改

This commit is contained in:
kai60 2020-06-28 18:07:46 +08:00
parent 5cfacf22d4
commit 196f47005e
7 changed files with 178 additions and 82 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -15753,7 +15753,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 18; CURRENT_PROJECT_VERSION = 19;
DEVELOPMENT_TEAM = WFX8GD5HFX; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@ -15871,7 +15871,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 18; CURRENT_PROJECT_VERSION = 19;
DEVELOPMENT_TEAM = WFX8GD5HFX; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;

View File

@ -39,11 +39,18 @@ Strong UITextView *textView;
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
-(void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
[self protocolIsSelect:YES];
}
-(UITextView *)textView{ -(UITextView *)textView{
if (!_textView) { if (!_textView) {
_textView = InitObject(UITextView); _textView = InitObject(UITextView);
_textView.adjustsFontForContentSizeCategory=YES;
[self protocolIsSelect:YES];
} }
return _textView; return _textView;
@ -69,8 +76,21 @@ range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]
range:[[attributedString string] rangeOfString:@"插排及热流器售后服务热线点击这里。"]]; range:[[attributedString string] rangeOfString:@"插排及热流器售后服务热线点击这里。"]];
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:NSMakeRange(0, attributedString.length)]; CGFloat fontSize=18;
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:18] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]]; if (self.view.frame.size.width>410)
{
fontSize=18;
}
else if (self.view.frame.size.width>370)
{
fontSize=15;
}
else
{
fontSize=12;
}
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:fontSize] range:NSMakeRange(0, attributedString.length)];
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:fontSize] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
[attributedString addAttribute:NSLinkAttributeName value:@"tel://18667812003" range:[[attributedString string] rangeOfString:@"18667812003"]]; [attributedString addAttribute:NSLinkAttributeName value:@"tel://18667812003" range:[[attributedString string] rangeOfString:@"18667812003"]];
@ -87,7 +107,7 @@ _textView.delegate=self;
_textView.editable=NO; _textView.editable=NO;
_textView.scrollEnabled = NO; _textView.scrollEnabled = YES;
} }
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange { - (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {

View File

@ -31,7 +31,7 @@
}else if (str.length == IFISH_BACKMASGTYAP57){ }else if (str.length == IFISH_BACKMASGTYAP57){
// 57 // 57
str=[str substringWithRange:NSMakeRange(88,IFISH_TEMPERATURE_BYTE2)]; str=[str substringWithRange:NSMakeRange(88,IFISH_TEMPERATURE_BYTE2)];
}else if (str.length == IFISH_BACKMASGTYAP57){ }else if (str.length == IFISH_BACKMASGTYAP57){
// //
@ -250,10 +250,10 @@
+(void)XuToControlCommandSelectorWithBackModel73:(XutoBackMsgModel *)model atindexPath:(NSIndexPath *) +(void)XuToControlCommandSelectorWithBackModel73:(XutoBackMsgModel *)model atindexPath:(NSIndexPath *)
indexPath{ indexPath{
NSInteger index= indexPath.row - 3; NSInteger index= indexPath.row - 3;
manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init]; manulswitchMSModel*manulModel=[[manulswitchMSModel alloc]init];
[[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel]; [[Socketsingleton sharedInstance] setSoketLightDataWith:manulModel];
NSString*switchString=manulModel.description; NSString*switchString=manulModel.description;
if (index == 0) { if (index == 0) {
@ -311,30 +311,30 @@ indexPath{
}else if (index == 4){ }else if (index == 4){
// p2p // p2p
// manulModel.lightNumber = @"05"; // manulModel.lightNumber = @"05";
// //
// if([[model.waterpump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) // if([[model.waterpump substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
// { // {
// manulModel.switchBtn = @"01"; // manulModel.switchBtn = @"01";
// //
// }else{ // }else{
// //
// manulModel.switchBtn = @"00"; // manulModel.switchBtn = @"00";
// } // }
}else if (index == 5){ }else if (index == 5){
// manulModel.lightNumber = @"06"; // manulModel.lightNumber = @"06";
// // // //
// if([[model.heatStickState substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) // if([[model.heatStickState substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
// { // {
// manulModel.switchBtn = @"01"; // manulModel.switchBtn = @"01";
// //
// }else{ // }else{
// //
// manulModel.switchBtn = @"00"; // manulModel.switchBtn = @"00";
// } // }
return; return;
@ -521,16 +521,16 @@ indexPath{
}else if (index == 7){ }else if (index == 7){
// //
// if([[model.jiaReBtn substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) // if([[model.jiaReBtn substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
// { // {
// manulModel.switchBtn = @"01"; // manulModel.switchBtn = @"01";
// //
// }else{ // }else{
// //
// manulModel.switchBtn = @"00"; // manulModel.switchBtn = @"00";
// } // }
// //
// manulModel.lightNumber = @"08"; // manulModel.lightNumber = @"08";
return; return;
@ -933,13 +933,14 @@ indexPath {
NSString*state; NSString*state;
if ([model isKindOfClass:[Xuanduo3fModel class]]) if ([model isKindOfClass:[Xuanduo3fModel class]])
{ {
state=model.gasPump; Xuanduo3fModel*xuan3Model=(Xuanduo3fModel*)model;
manulModel.lightNumber=@"01"; state=xuan3Model.light;
} manulModel.lightNumber=@"01";
else{ }
state= model.waterPump; else{
state= model.waterPump;
} }
if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{ {
@ -973,14 +974,14 @@ indexPath {
manulModel.lightNumber = @"02"; manulModel.lightNumber = @"02";
NSString*state; NSString*state;
if ([model isKindOfClass:[Xuanduo3fModel class]]) if ([model isKindOfClass:[Xuanduo3fModel class]])
{ {
state=model.uvLamp; state=model.uvLamp;
manulModel.lightNumber=@"03"; manulModel.lightNumber=@"03";
} }
else{ else{
state= model.light1; state= model.light1;
} }
if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{ {
manulModel.switchBtn = @"01"; manulModel.switchBtn = @"01";
@ -996,14 +997,14 @@ indexPath {
manulModel.lightNumber = @"03"; manulModel.lightNumber = @"03";
NSString*state; NSString*state;
if ([model isKindOfClass:[Xuanduo3fModel class]]) if ([model isKindOfClass:[Xuanduo3fModel class]])
{ {
state=((Xuanduo3fModel*)model).constTmep; state=((Xuanduo3fModel*)model).constTmep;
manulModel.lightNumber=@"04"; manulModel.lightNumber=@"04";
} }
else{ else{
state= model.light2; state= model.light2;
} }
if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"]) if([[state substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)] isEqualToString:@"00"])
{ {

View File

@ -31,11 +31,13 @@
#import "RuiMeiCHControl.h" #import "RuiMeiCHControl.h"
#import "Xuanduo2DataUtility.h" #import "Xuanduo2DataUtility.h"
#import "NSString+Add.h" #import "NSString+Add.h"
#import "Xuanduo2TimerModel.h"
#define ktempTag 600 #define ktempTag 600
@implementation MonitorBootmView @implementation MonitorBootmView
{ {
NSTimer *_switchTimer; NSTimer *_switchTimer;
XuanduoCycleModel * _cycleModel;
} }
-(id)initWithFrame:(CGRect)frame -(id)initWithFrame:(CGRect)frame
@ -960,7 +962,7 @@
[self makeToast:@"暂未连接"]; [self makeToast:@"暂未连接"];
return; return;
} }
if (indexPath.row == 10 || indexPath.row == 3) { if (indexPath.row == 10 || (indexPath.row == 3&&[self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F])) {
// //
[self.MonitorBottomDelegate selectXuanduo2Index:indexPath withBackModel:_xuanduoBack]; [self.MonitorBottomDelegate selectXuanduo2Index:indexPath withBackModel:_xuanduoBack];
}else{ }else{
@ -1736,8 +1738,13 @@
-(void)ifishDeviceLogInSuccees{ -(void)ifishDeviceLogInSuccees{
if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
[self readCycleWithNumber:@"03"];
}
} }
@ -1750,7 +1757,20 @@
} }
-(void)readCycleWithNumber:(NSString*)num
{
baseModel*readModel=[[baseModel alloc]init];
readModel.sendmacId =self.device.macAddress;
readModel.resavemacId =self.device.macAddress;
readModel.functionCode=@"19";
readModel.massagelegth=@"12";
NSString*readString=[NSString stringWithFormat:@"%@%@%@",readModel.description,num,@"0000"];
NSData*readData=[dataContorl stringToHexData:readString];
[[Socketsingleton sharedInstance] soketWriteData:readData];
}
-(void)judgeBackamsgTaypeWith:(DeviceModel *)devicemoel addData:(NSData *)data{ -(void)judgeBackamsgTaypeWith:(DeviceModel *)devicemoel addData:(NSData *)data{
[self hideToastActivity]; [self hideToastActivity];
@ -1854,12 +1874,54 @@
[self.collectionView reloadData]; [self.collectionView reloadData];
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO3F]){ }else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO3F]){
// //
if (!_xuanduoBack) { NSString*string1=[dataContorl dataToHexString:data];
_xuanduoBack = [[Xuanduo3fModel alloc] init];
NSString *readTimer = [string1 substringToIndex:4];
if ([readTimer isEqualToString:@"0119"])
{
_cycleModel=[[XuanduoCycleModel alloc]init];
[Xuanduo2DataUtility readCycleSocketDataWithBackMsgModel:_cycleModel addWithBackStr:string1 type:self.device.type];
if (_cycleModel.lastTime.length)
{
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp1 = mac1;
NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1];
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
UIImage*uvsel=[UIImage imageNamed:@"杀菌开"];
uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
}
} }
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data type:self.device.type]; else
self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO3F]; {
[self.collectionView reloadData]; if (!_xuanduoBack) {
_xuanduoBack = [[Xuanduo3fModel alloc] init];
}
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data type:self.device.type];
self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO3F];
Xuanduo3fModel*model=_xuanduoBack;
//
if ([model.vuPHstatus isEqualToString:@"0000"]&&_cycleModel.lastTime)
{
model.vuPHstatus=_cycleModel.lastTime;
}
[self.collectionView reloadData];
}
} }
else{ else{

View File

@ -18,6 +18,7 @@
#import "RunSun84Protocol.h" #import "RunSun84Protocol.h"
#import "RuiMeiProtocolModel.h" #import "RuiMeiProtocolModel.h"
#import "Xuanduo2Model.h" #import "Xuanduo2Model.h"
#import "UIImage+WaterMark.h"
@interface FishControlFourthCell : UICollectionViewCell @interface FishControlFourthCell : UICollectionViewCell

View File

@ -334,12 +334,24 @@
NSString*stateString=[xuan3fmodel.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; NSString*stateString=[xuan3fmodel.uvLamp substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr]; addOffArr:imgOffArr];
UInt64 mac1=[dataContorl hexToTen:xuan3fmodel.vuPHstatus];
//float TPlabel=mac/10+(mac%10)*0.1;
NSString *lasttime = [NSString stringWithFormat:@"%lld",mac1];
self.controBtnImg.image=[self.controBtnImg.image imageWaterMarkWithString:lasttime rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
}else if (index == 3){ }else if (index == 3){
NSString*stateString=[xuan3fmodel.constTmep substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)]; NSString*stateString=[xuan3fmodel.constTmep substringWithRange:NSMakeRange(2, IFISH_LIGHTBTN_BYTE)];
[self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr [self btnImgAtIndex:indexPath withStr:stateString addWithOnImg:imgOnArr
addOffArr:imgOffArr]; addOffArr:imgOffArr];
UInt64 mac=[dataContorl hexToTen:xuan3fmodel.heatingTemperature];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp = mac/10.0;
NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp];
self.controBtnImg.image=[ self.controBtnImg.image imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 80, 80) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}];
}else }else
{ {