有谁知道iOS 5标头中SBCallAlert.h的替代方法?我需要知道何时收到来电,并在此之前执行一些操作。我曾经在iOS 4中用SBCallAlert,initWithCall这样做过。
感谢您的回复,
发布于 2012-03-21 10:52:08
在ios5框架中删除了SBCallAlert。
像这样检测来电号码:
%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) Call Answering Screen in iPhone
https://stackoverflow.com/questions/9214449
复制相似问题