sybz

废话不多说,直接上代码:

+ (void) makeCall:(NSString *)phoneNumber   

{   

    if ([DeviceDetection isIPodTouch]){   

        [UIUtils alert:kCallNotSupportOnIPod];   

        return;   

    }           

    NSString* numberAfterClear = [UIUtils cleanPhoneNumber:phoneNumber];              

    NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", numberAfterClear]];   

    NSLog(@"make call, URL=%@", phoneNumberURL);   

    [[UIApplication sharedApplication] openURL:phoneNumberURL];       

}   


分类:

技术点:

相关文章:

  • 2022-01-29
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2021-05-27
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-08-14
  • 2022-12-23
  • 2021-12-31
  • 2022-01-14
相关资源
相似解决方案