The project needs to detect the status of the call, using the Ctcallcenter, in Appdelegate, the code is as follows:
? Ctcallcenter *callcenter = [[Ctcallcenter alloc] init]; Callcenter.calleventhandler = ^ (Ctcall *call) { if ([call.callstate isequaltostring:ctcallstatedialing]) { NSLog (@ "Call dialing"); } if (call.callstate = = ctcallstateconnected) { NSLog (@ "Call Connected"); } if (call.callstate = = ctcallstatedisconnected) { } };?
It is strange to do nothing at all .... Call to answer the hanging off God horse does not walk block.
Looking for half a day Niang Google also have no solution. And then actually thought,
Ctcallcenter *callcenter writes the member variable and then it's normal ...
In the original Arc mode, a block of code, Callcenter was released.
IOS determines caller status Ctcallcenter code block does not perform problem resolution