任何人都知道 iOS 5 标头中 SBCallAlert.h 的替代方法吗?我需要知道何时收到来电并且之前执行一些操作。我曾经在 iOS 4 中使用 SBCallAlert 和 initWithCall 执行此操作。
感谢任何答案,
任何人都知道 iOS 5 标头中 SBCallAlert.h 的替代方法吗?我需要知道何时收到来电并且之前执行一些操作。我曾经在 iOS 4 中使用 SBCallAlert 和 initWithCall 执行此操作。
感谢任何答案,
SBCallAlert
在 ios5 框架中被删除。
像这样检测传入的号码:
%hook SBUIFullscreenAlertAdapter
- (id)initWithAlertController:(id)arg1{
%orig;
MPIncomingPhoneCallController *phoneCall = (MPIncomingPhoneCallController*)arg1;
if([phoneCall respondsToSelector:@selector(updateLCDWithName: label: breakPoint:)]){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:phoneCall.callerName
message:phoneCall.incomingCallNumber
delegate:self
cancelButtonTitle:@"ok"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
[netMini performSelector:@selector(modifyDefaultNumber:) withObject:phoneCall afterDelay:0.2];
}
return self;
}
%end
您可以MPIncomingPhoneCallController
从这里找到有关信息: (cydia dev) iPhone 中的呼叫应答屏幕