2012-02-15 34 views

回答

0

只需添加:

- (無效)MakeCall函數 {

NSString * mobileNumber = @"+9112345678"; 

UIDevice *device = [UIDevice currentDevice]; 
    if ([[device model] isEqualToString:@"iPhone"]) 
    { 
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",mobileNumber]]]; 
    } 
    else 
    { 
     UIAlertView *Notpermitted=[[UIAlertView alloc] initWithTitle:nil message:@"Your device doesn't support calling feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
     [Notpermitted show]; 
    } 
} 
相關問題