美文网首页
电话监听

电话监听

作者: 西博尔 | 来源:发表于2016-07-12 17:49 被阅读39次

    CTCallCenter callCenter = [[CTCallCenter alloc] init];
    callCenter.callEventHandler = ^(CTCall
    call) {
    if ([call.callState isEqualToString:CTCallStateDisconnected])
    {
    NSLog(@"Call has been disconnected");
    }
    else if ([call.callState isEqualToString:CTCallStateConnected])
    {
    NSLog(@"Call has just been connected");
    }
    else if([call.callState isEqualToString:CTCallStateIncoming])
    {
    NSLog(@"Call is incoming");
    }
    else if ([call.callState isEqualToString:CTCallStateDialing])
    {
    NSLog(@"call is dialing");
    }
    else
    {
    NSLog(@"Nothing is done");
    }
    };

    相关文章

      网友评论

          本文标题:电话监听

          本文链接:https://www.haomeiwen.com/subject/pxksjttx.html