我试图让我在后台的应用程序在呼叫断开后进入前台。这是代码:
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel:0123456789"]]){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:0123456789"]];
} else {
// Could not make call
}
CTCallCenter *c=[[CTCallCenter alloc] init];
c.callEventHandler=^(CTCall* call){
if(call.callState == CTCallStateDisconnected) {
// code to make app return to the foreground
// I have tried calling applicationWillEnterForeground, but it didn't work
}
}
请帮忙