Ios 检测呼叫或共享连接
我的旗帜有一个奇怪的问题 我是这样实现的:Ios 检测呼叫或共享连接,ios,objective-c,connection,call,Ios,Objective C,Connection,Call,我的旗帜有一个奇怪的问题 我是这样实现的: bannerView = [[GADBannerView alloc] initWithFrame:CGRectMake(0, 430, 320, 50)];} bannerView.backgroundColor=[UIColor orangeColor]; bannerView.adUnitID = @"ca-app-pub-6085823141018149/3131322511"; bannerView.rootViewController =
bannerView = [[GADBannerView alloc] initWithFrame:CGRectMake(0, 430, 320, 50)];}
bannerView.backgroundColor=[UIColor orangeColor];
bannerView.adUnitID = @"ca-app-pub-6085823141018149/3131322511";
bannerView.rootViewController = self;
[bannerView sizeToFit];
GADRequest *request3 = [GADRequest request];
request3.testDevices = @[ GAD_SIMULATOR_ID, @"MY_TEST_DEVICE_ID" ];
[bannerView loadRequest:request3];
直到我接到一个电话或一个电话,我才能开始共享连接。发生这种情况时,我的横幅显示为:
所以我发现这是因为它把所有元素都放在40像素左右。是否可以检测何时收到呼叫或何时开始连接?要检测呼叫
CTCallCenter *ctCallCenter = [[CTCallCenter alloc] init];
if (ctCallCenter.currentCalls != nil)
{
NSArray* currentCalls = [ctCallCenter.currentCalls allObjects];
for (CTCall *call in currentCalls)
{
if(call.callState == CTCallStateConnected)
{
// Call is in place
}
}
}
可使用核心蓝牙检测蓝牙状态
看