在我的应用程序中,我使用CallKit进行来电.应用中没有拨出电话功能.一切都很好但是当接收器或dailer结束呼叫时,它会显示带有回叫选项的CallKit UI.我不想显示回调选项,我该怎么办呢?
我结束通话的代码
func end(call: SpeakerboxCall) {
let endCallAction = CXEndCallAction(call: call.uuid)
let transaction = CXTransaction()
transaction.addAction(endCallAction)
requestTransaction(transaction, action: "endCall")
}
private func requestTransaction(_ transaction: CXTransaction, action:
String = "") {
callController.request(transaction) { error in
if let error = error {
print("Error requesting transaction: \(error)")
} else {
print("Requested transaction \(action) successfully")
}
}
}
Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,在呈现UIAlertController它时将消息截断为一行.如何使用自动换行显示全文显示.
这是我的代码
let alert = UIAlertController(title: title, message:"Long text" ,
preferredStyle: UIAlertControllerStyle.alert)
let okAction = UIAlertAction(title: "OK", style:
UIAlertActionStyle.default, handler: nil)
alert.addAction(okAction)
self.present(alert, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)