Simple implementation of the IOS call function

Source: Internet
Author: User

Introduction to Small functions

Many of the small features in iOS are simple, with a few lines of code, such as calling, opening URLs, sending emails, texting, etc.

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"]];

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

Note: This webview must not set the size, otherwise it will block the other interface, he just used to call, do not need to display

Simple implementation of the IOS call function

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.