2016-03-07 84 views
0

我試圖打開應用程序「計算器」,但我不知道該計劃計算器的計劃是什麼?

- (IBAction)btnColetorClick:(id)sender 
{ 
    NSString *customURL = @"calculator://"; 

    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]]) 
    { 
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]]; 
    } 
    else 
    { 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"URL error" 
                 message:[NSString stringWithFormat:@"No custom URL defined for %@", customURL] 
                 delegate:self 
               cancelButtonTitle:@"Ok" 
               otherButtonTitles:nil]; 
     [alert show]; 
    } 
} 
+0

你可以找到URL方案在這裏的列表:HTTP://wiki.akosma .COM/IPhone_URL_Sche mes –

+0

我沒有找到計算器的計劃 – sdadsad

回答