search

Home  >  Q&A  >  body text

objective-c - iOS跳转到拨号界面,怎么实现?

1.跳转到拨号界面,并不是直接拨打电话!!!

巴扎黑巴扎黑2889 days ago226

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 17:56:17

    Try this:

    NSString *telNumber = [NSString stringWithFormat:@"tel:%@", @"88888888"];
    NSURL *aURL = [NSURL URLWithString:telNumber];
    if ([[UIApplication sharedApplication] canOpenURL:aURL]) {
        [[UIApplication sharedApplication] openURL:aURL];
    }

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:56:17

    app singleton calls openUrl

    reply
    0
  • Cancelreply