新版本
This commit is contained in:
+46
-18
@@ -13,6 +13,8 @@
|
||||
#import "YooseeNextConnectViewController.h"
|
||||
#import "SecondConnectWifiController.h"
|
||||
#import "IfishHotBarVc.h"
|
||||
#import "HitbarWifeVc.h"
|
||||
#import "SVProgressHUD.h"
|
||||
|
||||
|
||||
@interface IfishBindDeviceSelectViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@@ -28,21 +30,22 @@ extern BOOL isfromCameraView;
|
||||
// Do any additional setup after loading the view.
|
||||
[self addTitleViewWithTitle:@"选择设备"];
|
||||
[self creatTab];
|
||||
[self loginGewell];
|
||||
}
|
||||
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
[self loginGewell];
|
||||
if( _islogInGewell){
|
||||
|
||||
NSLog(@"p2pConnect success.成功,你可以操作设备了");
|
||||
|
||||
}else{//new added
|
||||
[self loginGewell];
|
||||
NSLog(@"p2pConnect failure.失败,你将不能操作设备");
|
||||
|
||||
return;
|
||||
}
|
||||
// [self loginGewell];
|
||||
// if( _islogInGewell){
|
||||
//
|
||||
// NSLog(@"p2pConnect success.成功,你可以操作设备了");
|
||||
//
|
||||
// }else{//new added
|
||||
// [self loginGewell];
|
||||
// NSLog(@"p2pConnect failure.失败,你将不能操作设备");
|
||||
//
|
||||
//// return;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -51,14 +54,14 @@ extern BOOL isfromCameraView;
|
||||
//CGPoint curentpoint= [self.cardScrollView contentOffsetWithIndex:[self.cardScrollView currentCard]];
|
||||
//[self.cardScrollView.scrollView setContentOffset:curentpoint animated:NO];
|
||||
|
||||
[self loginGewell];
|
||||
// [self loginGewell];
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - loginGewell
|
||||
-(void)loginGewell{
|
||||
|
||||
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeBlack];
|
||||
[[UDPManager sharedDefault] ScanLanDevice];
|
||||
|
||||
_islogInGewell = NO;
|
||||
@@ -88,7 +91,24 @@ extern BOOL isfromCameraView;
|
||||
return;
|
||||
}
|
||||
|
||||
_islogInGewell = [[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
|
||||
|
||||
dispatch_queue_t queue = dispatch_queue_create("net.bujige.testQueue", DISPATCH_QUEUE_CONCURRENT);
|
||||
|
||||
dispatch_async(queue, ^{
|
||||
// 追加任务1
|
||||
[[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
[SVProgressHUD dismiss];
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -129,7 +149,9 @@ extern BOOL isfromCameraView;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if(self.view.frame.size.width<=340.0){
|
||||
return self.view.frame.size.width*0.304;
|
||||
}
|
||||
return self.view.frame.size.width*0.504;
|
||||
|
||||
}
|
||||
@@ -207,6 +229,7 @@ extern BOOL isfromCameraView;
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
|
||||
SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
|
||||
wifivc.vcTitle=@"连接水族箱";
|
||||
[self.navigationController pushViewController:wifivc animated:YES];
|
||||
|
||||
|
||||
@@ -214,10 +237,15 @@ extern BOOL isfromCameraView;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
|
||||
SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
|
||||
wifivc.vcTitle=@"连接加热器";
|
||||
[self.navigationController pushViewController:wifivc animated:YES];
|
||||
// [wifivc addTitleViewWithTitle:@"连接加热器"];
|
||||
//[self.view makeToast:@"敬请期待"]; 加热棒
|
||||
IfishHotBarVc*barVc=[[IfishHotBarVc alloc]init];
|
||||
barVc.hidesBottomBarWhenPushed=YES;
|
||||
[self.navigationController pushViewController:barVc animated:YES];
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user