wxr
2023-05-29 2265a8478325a04871aab6a86d49c28d7d65443a
HDLLinPhoneSDK£¨OC£©/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m
@@ -58,6 +58,8 @@
    
    NSString * LCSdkToken;
    NSString * LCHostApi;
    NSString * cancelStr;
    NSString * tipMsgStr;
    
    CGFloat Height66;
    bool isShowErrorAlert;
@@ -120,6 +122,8 @@
        unlockStr = @"开锁";
        endOfMonitoringStr = @"监视结束";
        unlockSuccessfullyStr = @"开锁成功";
        cancelStr = @"取消";
        tipMsgStr = @"确定开锁吗?";
        
    }else{
        tipStr = @"Prompt";
@@ -130,6 +134,8 @@
        unlockStr = @"Unlock";
        endOfMonitoringStr = @"End of monitoring";
        unlockSuccessfullyStr = @"Unlock successfully";
        cancelStr = @"Cancel";
        tipMsgStr = @"Are you sure to unlock?";
    }
    
    
@@ -304,7 +310,26 @@
    [_unlockTextBtn setTitleColor:TextColor 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;
        // æ˜¾ç¤ºå¼¹çª—
        [self presentViewController:alertController animated:YES completion:nil];
    }
    
}