2010-08-26 9 views

Répondre

1

Voir ce fil, vous pouvez prendre l'extrait de code à partir de là tel quel et l'utiliser making a phone call w/o quitting an appication

Gardez à l'esprit qu'il est possible que d'iOS 3.1. Si vous ciblez iOS 3.0, il n'y a aucun moyen de ne pas quitter l'application.

NSString *callString = [NSString stringWithFormat:@"tel:%@", @"412-33-44-55"]; 
NSURL *url= [NSURL URLWithString:callString]; 

NSString *osVersion = [[UIDevice currentDevice] systemVersion]; 

if ([osVersion compare: @"3.1" options: NSNumericSearch] >= NSOrderedSame) { 
    UIWebView *webview = [[UIWebView alloc] initWithFrame:[callButton frame]]; 
    webview.alpha = 0.0; 

    [webview loadRequest:[NSURLRequest requestWithURL:url]]; 

    // Assume we are in a view controller and have access to self.view 
    [self.view insertSubview:webview belowSubview:callButton]; 
    [webview release]; 
} 
else { 
    // On 3.0 and below, dial as usual 
    NSString * s = [NSString stringWithFormat:@"tel://%@",@"412-33-44-55"]; 
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:s]]; 
} 
+0

hey, wher est ce lien dirigé à ?? se connecter après son aller au développeur iPhone, permet la discussion BEGIN :( – VinuthnaS

+0

vous devez vous identifier avec vos identifiants de développeur avant d'ouvrir ce fil. L'extrait est dans l'un des derniers messages Je peux atteindre le fil après avoir entré mes informations d'identification de l'ip de dev Faites-moi savoir si vous ne pouvez pas l'obtenir Je vais copier/coller ici, mais vous ne pouvez pas l'essayer avec simulateur, seulement avec 3.1 ou plus récent –

+0

Salut Nava Carmon, j'ai entré mes informations d'identification, son accepté n me diriger à nouveau à la même page .. pouvez-vous s'il vous plaît copier/coller ici ... – VinuthnaS

Questions connexes