0

iOS 5 ヘッダー内の SBCallAlert.h に代わるものを知っている人はいますか? 着信がいつ受信されたかを知り、その前にいくつかのアクションを実行する必要があります。以前は iOS 4 で SBCallAlert、initWithCall を使用して実行していました。

どんな答えでも感謝します、

4

1 に答える 1

0

SBCallAlertios5 フレームワークで削除されました。

次のように着信番号を検出します。

%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の通話応答画面

于 2012-03-21T02:52:07.813 に答える