1.首先引入CoreTelephony.framework
2.加入头文件
|
|
---|
3.功能实现
|
|
---|
当电话打进来时,程序就会执行我们的block.
CTCall (0x1ab590) {
callState: [CTCallStateIncoming]
Call ID: [2B9E84A9-0F12-4539-AC8D-AF2A7ED7069E]
}
CTCall (0x183a00) {
callState: [CTCallStateDisconnected]
Call ID: [2B9E84A9-0F12-4539-AC8D-AF2A7ED7069E]
}
注:__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0)