单军华
2018-03-29 89d748b77b478905732e60f0b4c5807c274b6565
pregnancy_guard/BaseProject/Controller/Home/SearchDevicePage.m
@@ -61,7 +61,7 @@
{
    [super viewDidAppear:animated];
    [[CBMoralManager sharedManager] disconnectPeripheral:[[CBMoralManager sharedManager] myPeripheral]];
    
}
@@ -114,10 +114,12 @@
    
    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)];
@@ -134,7 +136,7 @@
    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;
@@ -204,7 +206,7 @@
            _SetTitleLabel.text = @"操作设置步骤";
            
            return cell;
        }
        else
        {
@@ -292,10 +294,10 @@
            
            //[cell setDiscoveredPeripheralDataFromPeripheral:newPeriPheral];
            
           return cell;
            return cell;
        }
    }
    return  nil;
}
@@ -367,28 +369,28 @@
-(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];
    }
}
@@ -449,7 +451,7 @@
                [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];
            }
@@ -508,13 +510,14 @@
}
/*
#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