| | |
| | | NSTimer * myTimer; |
| | | NSString * myTimeInterval; |
| | | NSString * is_open_upload; // 1 可以 0 禁止 |
| | | |
| | | GloriaLabel* _AnquanStatustLabel; |
| | | UIImageView * icon_anquan; |
| | | UIImageView * ic_zhishu_bk; |
| | | UIImageView * ic_weixin_tips; |
| | | } |
| | | @end |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | *This method invoke after a new peripheral found. |
| | | *This method invoke after a new peripheral found. 蓝牙检索成功 开始连接 |
| | | */ |
| | | -(void)discoveryDidRefresh |
| | | { |
| | |
| | | |
| | | |
| | | UIImageView * icon_anquan = [[UIImageView alloc] initWithFrame:CGRectMake(19*scale, 10*scale, 22*scale, 22*scale)]; |
| | | icon_anquan.image = [UIImage imageNamed:@"icon_anquan"]; |
| | | icon_anquan.image = [UIImage imageNamed:@"icon_head_offline"]; |
| | | [ic_anquan_status addSubview:icon_anquan]; |
| | | |
| | | |
| | | GloriaLabel* _AnquanStatustLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(0, 35*scale,60*scale, 20*scale)]; |
| | | _AnquanStatustLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(0, 35*scale,60*scale, 20*scale)]; |
| | | _AnquanStatustLabel.font = [UIFont systemFontOfSize:unitFontSize]; |
| | | _AnquanStatustLabel.textAlignment = UITextAlignmentCenter; |
| | | _AnquanStatustLabel.textColor = kUIColorFromRGB(0x07cb5a); |
| | |
| | | [ic_anquan_status addSubview:_AnquanStatustLabel]; |
| | | |
| | | |
| | | UIImageView * ic_zhishu_bk = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-245*scale)/2, (66+20+292+20)*scale, 245*scale, 48*scale)]; |
| | | ic_zhishu_bk = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-245*scale)/2, (66+20+292+20)*scale, 245*scale, 48*scale)]; |
| | | ic_zhishu_bk.image = [UIImage imageNamed:@"ic_zhishu_bk"]; |
| | | [self.view addSubview:ic_zhishu_bk]; |
| | | |
| | |
| | | _currentTipsLabel.text = @"未开始检测"; |
| | | [ic_bottom_bg addSubview:_currentTipsLabel]; |
| | | |
| | | UIImageView * ic_weixin_tips = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-34*scale)/2, -17*scale, 34*scale, 34*scale)]; |
| | | ic_weixin_tips = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-34*scale)/2, -17*scale, 34*scale, 34*scale)]; |
| | | ic_weixin_tips.image = [UIImage imageNamed:@"ic_weixin_tips"]; |
| | | [ic_bottom_bg addSubview:ic_weixin_tips]; |
| | | |
| | |
| | | |
| | | _locService.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; |
| | | |
| | | [self startLocation]; |
| | | //[self startLocation]; |
| | | |
| | | dataModelArr = [[NSMutableArray alloc] init]; |
| | | |
| | | myTimeInterval = [UserDefault stringForKey:@"refresh_frequency"]; |
| | | is_open_upload = [UserDefault stringForKey:@"is_open_upload"]; |
| | | |
| | | [self offLineSet]; |
| | | //myTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(function:) userInfo:nil repeats:YES]; |
| | | //每1秒运行一次function方法。 |
| | | |
| | | } |
| | | |
| | | -(void)offLineSet |
| | | { |
| | | _AnquanStatustLabel.text = @"离线"; |
| | | _AnquanStatustLabel.textColor = kUIColorFromRGB(0x848787); |
| | | deviceStatusLabel.text = @"未连接"; |
| | | deviceStatusLabel.textColor = kUIColorFromRGB(0x848787); |
| | | icon_anquan.image = [UIImage imageNamed:@"icon_head_offline"]; |
| | | ic_anquan_status.image = [UIImage imageNamed:@"bg_corner_gray"]; |
| | | ic_weixin_tips.image = [UIImage imageNamed:@"icon_offline"]; |
| | | ic_zhishu_bk.image = [UIImage imageNamed:@"bt_offline"]; |
| | | _currentTipsLabel.textColor = kUIColorFromRGB(0x848787); |
| | | } |
| | | |
| | | -(void)connectAction |
| | | { |
| | | SearchDevicePage* page = [[SearchDevicePage alloc] initIsFirstPage:NO]; |