IOS Dev Call feature

Source: Internet
Author: User

Call-Method 1

The simplest and most straightforward way: jump directly to the dial-up interface

Nsurl *url = [Nsurl urlwithstring:@ "tel://10010"];

[[UIApplication sharedapplication] openurl:url];

Disadvantages

After the call, will not automatically return to the original application, directly in the Call log interface

Call-Method 2

Before dialing, the box asks the user whether to dial or not and automatically returns to the original application after dialing out.

Nsurl *url = [Nsurl urlwithstring:@ "telprompt://10010"];

[[UIApplication sharedapplication] openurl:url];

Disadvantages

Because it is a private API, it may not be audited by

Call-Method 3

Create a UIWebView to load the URL and automatically go back to the original app when you're finished dialing

if (_webview = = nil) {

_webview = [[UIWebView alloc] Initwithframe:cgrectzero];

}

[_webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring:@ "tel://10010"]];

Note: This webview must not be added to the interface, or it will block other interfaces

IOS Dev Call feature

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.