How to make a phone call through programming

前端 未结 3 1694
终归单人心
终归单人心 2021-01-03 06:40

How to make a phone call through programming in iOS?

3条回答
  •  半阙折子戏
    2021-01-03 06:59

    Use UIApplication:openURL method to open a resource from other program. This includes opening mail, phone number, google maps search etc..

    So, in order for you to call somebody using the method, you can use

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:123456789"]];
    

提交回复
热议问题