2012-02-15 66 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]; 
    } 
}