| | |
| | | NSString * callingStr; |
| | | NSString * hangUpStr; |
| | | NSString * endOfCallStr; |
| | | |
| | | NSString * cancelStr; |
| | | NSString * tipMsgStr; |
| | | |
| | | // int openDoorTimeout; |
| | | //全局变量 |
| | | SystemSoundID sound; |
| | |
| | | unlockSuccessfullyStr = @"开锁成功"; |
| | | callingStr = @"来电中..."; |
| | | endOfCallStr = @"通话结束"; |
| | | cancelStr = @"取消"; |
| | | tipMsgStr = @"确定开锁吗?"; |
| | | }else{ |
| | | tipStr = @"Prompt"; |
| | | okStr = @"OK"; |
| | |
| | | unlockSuccessfullyStr = @"Unlock successfully"; |
| | | callingStr = @"Incoming call"; |
| | | endOfCallStr = @"End of call"; |
| | | cancelStr = @"Cancel"; |
| | | tipMsgStr = @"Are you sure to unlock?"; |
| | | |
| | | } |
| | | } |
| | |
| | | [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal]; |
| | | //开锁 |
| | | if(self.hdlLinphoneCallDelegate != NULL){ |
| | | [self.hdlLinphoneCallDelegate onUnlockAction]; |
| | | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert]; |
| | | |
| | | // 添加取消按钮 |
| | | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil]; |
| | | [alertController addAction:cancelAction]; |
| | | |
| | | // 添加确认按钮 |
| | | WEAKSELF_AT |
| | | UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { |
| | | |
| | | [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction]; |
| | | }]; |
| | | [alertController addAction:confirmAction]; |
| | | |
| | | // 获取当前视图控制器 |
| | | UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; |
| | | |
| | | // 显示弹窗 |
| | | [currentViewController presentViewController:alertController animated:YES completion:nil]; |
| | | |
| | | } |
| | | } |
| | | |