1
我得在通话结束通话状态不会被调用,但我的事件,则不会调用下面像线总是返回falseCallEventhandler目标C
[呼叫中心setCallEventHandler:^(CTCall *调用)
这里是我的代码
CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler=^(CTCall* call)
{
if(call.callState == CTCallStateDialing)
{
//The call state, before connection is established, when the user initiates the call.
NSLog(@"Call is dailing");
}
if(call.callState == CTCallStateIncoming)
{
//The call state, before connection is established, when a call is incoming but not yet answered by the user.
NSLog(@"Call is Coming");
}
if(call.callState == CTCallStateConnected)
{
//The call state when the call is fully established for all parties involved.
NSLog(@"Call Connected");
}
if(call.callState == CTCallStateDisconnected)
{
//The call state Ended.
NSLog(@"Call Ended");
}
};
任何帮助将大大appriciated