摄像头链接,宠物笼界面

This commit is contained in:
祝发冬 2022-12-19 12:33:57 +08:00
parent e0a19c275c
commit a0e5554d26
5 changed files with 54 additions and 61 deletions

View File

@ -16025,7 +16025,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 = 16; CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = WFX8GD5HFX; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@ -16145,7 +16145,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 16; CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = WFX8GD5HFX; DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;

View File

@ -749,14 +749,11 @@ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
NSString *BSSID = @""; NSString *BSSID = @"";
NSString *SSID = @""; NSString *SSID = @"";
NetworkStatus status = [[Reachability reachabilityForInternetConnection] currentReachabilityStatus];
switch ([[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) switch (status)
{ {
case NotReachable:// case NotReachable:// ,
{
netconnType = @"no network";
}
break;
case ReachableViaWiFi:// Wifi case ReachableViaWiFi:// Wifi
{ {
netconnType = @"Wifi"; netconnType = @"Wifi";

View File

@ -380,6 +380,8 @@
</dict> </dict>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>爱鱼奇需要您的同意,才能使用相机,以使用图片上传或扫一扫等功能</string> <string>爱鱼奇需要您的同意,才能使用相机,以使用图片上传或扫一扫等功能</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>为获取爱鱼奇智能硬件产品及用户的地址区域分布,以提供更好的特色服务,爱鱼奇将获取您的地址</string>
<key>NSLocalNetworkUsageDescription</key> <key>NSLocalNetworkUsageDescription</key>
<string>为给爱鱼奇智能硬件产品配置网络,发送指令等,需要使用本地网络</string> <string>为给爱鱼奇智能硬件产品配置网络,发送指令等,需要使用本地网络</string>
<key>NSLocationAlwaysUsageDescription</key> <key>NSLocationAlwaysUsageDescription</key>

View File

@ -194,6 +194,7 @@ static NSString *setTimerflag = @"SetTimerCell";
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0){ if (indexPath.section == 0){
TemperatureSetCell *cell = [tableView dequeueReusableCellWithIdentifier:temperatureCellid]; TemperatureSetCell *cell = [tableView dequeueReusableCellWithIdentifier:temperatureCellid];
cell.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"set_cellBack"]];
TemperatureSetModel *model=[[TemperatureSetModel alloc]init]; TemperatureSetModel *model=[[TemperatureSetModel alloc]init];
model.title = @"预警设置"; model.title = @"预警设置";
cell.titleLabel.text = model.title; cell.titleLabel.text = model.title;
@ -355,6 +356,25 @@ static NSString *setTimerflag = @"SetTimerCell";
[cell configTitleLabel:@"循环开关" timer:[NSString stringWithFormat:@"持续时长%d分钟",[dataContorl hexToTen:model.lastTime]] switchStatus:isOn]; [cell configTitleLabel:@"循环开关" timer:[NSString stringWithFormat:@"持续时长%d分钟",[dataContorl hexToTen:model.lastTime]] switchStatus:isOn];
if (indexPath.section==1+_titieArr.count)
{
if(_selectSection == indexPath.section)
{
cell.backImageView.image=[UIImage imageNamed:@"bottomRound"];
}
else
{
cell.backImageView.image=[UIImage imageNamed:@"ifishSetCell_back.png"];
}
}
else
{
cell.backImageView.image=[UIImage imageNamed:@"ifishSetCell_back.png"];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
} }
@ -420,76 +440,49 @@ static NSString *setTimerflag = @"SetTimerCell";
} }
- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
if (section == 0) { if (section == 0||([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]&&section==5)) {
UIView *oneHeader = [[UIView alloc] init]; UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN; oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader; return oneHeader;
}else if(section == 2){ }
else if(section > 1){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) { headerView.backImageView.image=[UIImage imageNamed:@"centerrect"];
headerView.controlBtn.selected = YES; if (section==2)
}
[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]; headerView.backImageView.image=[UIImage imageNamed:@"topround"];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
} }
else if (section==1+_titieArr.count)
{ {
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView]; if(_selectSection == section)
headerView.controlBtn.tag = kBtnTag + section; {
if (_selectSection == section) { headerView.backImageView.image=[UIImage imageNamed:@"centerrect"];
headerView.controlBtn.selected = YES;
} }
[headerView.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside]; else
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; {
return headerView; headerView.backImageView.image=[UIImage imageNamed:@"bottomRound"];
}
} }
}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){
XuanduoSelectHeader *headerView = [XuanduoSelectHeader shareHeaderView];
headerView.controlBtn.tag = kBtnTag + section; headerView.controlBtn.tag = kBtnTag + section;
if (_selectSection == section) { if (_selectSection == section) {
headerView.controlBtn.selected = YES; 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.controlBtn addTarget:self action:@selector(foldAction:) forControlEvents:UIControlEventTouchUpInside];
[headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]]; [headerView configWithImageName:_imgArr[section-2] labelName:_titieArr[section-2]];
return headerView; return headerView;
}else
{
UIView *oneHeader = [[UIView alloc] init];
oneHeader.backgroundColor = COLOR_MIAN;
return oneHeader;
} }
return nil; return nil;
} }
@ -1322,6 +1315,7 @@ static NSString *setTimerflag = @"SetTimerCell";
NSLog(@"minstring = %@",minString); NSLog(@"minstring = %@",minString);
NSData*tempData=[dataContorl stringToHexData:minString]; NSData*tempData=[dataContorl stringToHexData:minString];
[[Socketsingleton sharedInstance] soketWriteData:tempData]; [[Socketsingleton sharedInstance] soketWriteData:tempData];
[_indicatorView startAnimating];
} }

View File

@ -195,7 +195,7 @@ static NSString *cycleTimerflag = @"CycleTimerCell";
} }
CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size; CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size;
label.frame=CGRectMake((kScreenWidth-size.width)/2.0, kScreenHeight-NavigationBarHeight-size.height-88, size.width, size.height); label.frame=CGRectMake((kScreenWidth-size.width)/2.0, kScreenHeight-NavigationBarHeight-size.height, size.width, size.height);
[self.view addSubview:label]; [self.view addSubview:label];
} }
} }