有没有办法在swift中以编程方式拒绝来电。我的代码是这样的:
self.callCenter.callEventHandler = {(_ call: CTCall) -> Void in
if call.callState == CTCallStateDisconnected {
print("Call has been disconnected")
}
else if call.callState == CTCallStateConnected {
print("Call has just been connected")
}
else if call.callState == CTCallStateIncoming {
print("Call is incoming")
}
else {
print("None of the conditions")
}
我通过这种方式检测来电状态。但我不知道如何更改callstate
的{{1}}。请帮帮我!
答案 0 :(得分:0)
function String getStringOfSource()
{
return "username=" + source.username + " password=" + source.password;
}