| | |
| | | { |
| | | [super viewDidAppear:animated]; |
| | | [[CBMoralManager sharedManager] disconnectPeripheral:[[CBMoralManager sharedManager] myPeripheral]]; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | ic_top_bkH = 325; |
| | | ic_search_doneH = 230; |
| | | CGFloat btnSearchH = 55; |
| | | if ( IsiPhone4 || IsiPhone5 ) |
| | | { |
| | | ic_top_bkH = 260; |
| | | ic_search_doneH = 180; |
| | | btnSearchH = 40; |
| | | } |
| | | |
| | | UIImageView * ic_top_bk = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ic_top_bkH)]; |
| | |
| | | ic_searching.hidden = YES; |
| | | |
| | | ic_search_btn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| | | ic_search_btn.frame = CGRectMake((SCREEN_WIDTH-128)/2, ic_search_doneH+55, 128, 32); |
| | | ic_search_btn.frame = CGRectMake((SCREEN_WIDTH-128)/2, ic_search_doneH+btnSearchH, 128, 32); |
| | | [ic_search_btn setBackgroundImage:[UIImage imageNamed:@"ic_search_start_btn" ] forState:UIControlStateNormal]; |
| | | ic_search_btn.titleLabel.font = [UIFont systemFontOfSize: 18.0]; |
| | | ic_search_btn.layer.masksToBounds=YES; |
| | |
| | | _SetTitleLabel.text = @"操作设置步骤"; |
| | | |
| | | return cell; |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | //[cell setDiscoveredPeripheralDataFromPeripheral:newPeriPheral]; |
| | | |
| | | return cell; |
| | | return cell; |
| | | } |
| | | } |
| | | |
| | | |
| | | return nil; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
| | | |
| | | |
| | | if (_currentStatus == 2) |
| | | { |
| | | NSInteger index = [indexPath row]; |
| | | if (isBluetoothON) |
| | | { |
| | | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
| | | [self connectPeripheral:indexPath.row]; |
| | | } |
| | | |
| | | // DeviceSpareModel* model = [self.modelArray objectAtIndex:index]; |
| | | // 跳转酒店备用界面 |
| | | //HotelSelPage* page = [[HotelSelPage alloc] initIsFirstPage:NO]; |
| | | //page.bSelRoom = 2; |
| | | // 跳转界面 |
| | | //BaseNaviController *baseNav = [[BaseNaviController alloc] initWithRootViewController:page]; |
| | | //[self presentViewController:baseNav animated:YES completion:nil]; |
| | | //[self showActionForPhoto]; |
| | | } |
| | | |
| | | |
| | | if (_currentStatus == 2) |
| | | { |
| | | NSInteger index = [indexPath row]; |
| | | if (isBluetoothON) |
| | | { |
| | | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
| | | [self connectPeripheral:indexPath.row]; |
| | | } |
| | | |
| | | // DeviceSpareModel* model = [self.modelArray objectAtIndex:index]; |
| | | // 跳转酒店备用界面 |
| | | //HotelSelPage* page = [[HotelSelPage alloc] initIsFirstPage:NO]; |
| | | //page.bSelRoom = 2; |
| | | // 跳转界面 |
| | | //BaseNaviController *baseNav = [[BaseNaviController alloc] initWithRootViewController:page]; |
| | | //[self presentViewController:baseNav animated:YES completion:nil]; |
| | | //[self showActionForPhoto]; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | [UserDefault setObject:bleUUID forKey:@"bleUUID"]; |
| | | [UserDefault setObject:bleName forKey:@"bleName"]; |
| | | |
| | | [UserDefault synchronize];//使用synchronize强制立即将数据写入磁盘,防止在写完NSUserDefaults后程序退出导致的数据丢失 |
| | | [UserDefault synchronize];//使用synchronize强制立即将数据写入磁盘,防止在写完NSUserDefaults后程序退出导致的数据丢失 |
| | | //CBPeripheralExt *selBLE = [UserDefault objectForKey:@"Peripheral"];//根据键值取出Peripheral |
| | | [self backAticon]; |
| | | } |
| | |
| | | } |
| | | |
| | | /* |
| | | #pragma mark - Navigation |
| | | |
| | | // In a storyboard-based application, you will often want to do a little preparation before navigation |
| | | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { |
| | | // Get the new view controller using [segue destinationViewController]. |
| | | // Pass the selected object to the new view controller. |
| | | } |
| | | */ |
| | | #pragma mark - Navigation |
| | | |
| | | // In a storyboard-based application, you will often want to do a little preparation before navigation |
| | | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { |
| | | // Get the new view controller using [segue destinationViewController]. |
| | | // Pass the selected object to the new view controller. |
| | | } |
| | | */ |
| | | |
| | | @end |
| | | |