Two call methods for iOS and ios

Source: Internet
Author: User

Two call methods for iOS and ios

Method 1

NSString * phone = @ "88888888"


If (phone! = Nil ){

NSString * telUrl = [NSString stringWithFormat: @ "telprompt: % @", phone];

NSURL * url = [[NSURL alloc] initWithString: telUrl];

[[UIApplication sharedApplication] openURL: url];

}


Method 2


UIWebView * callWebview = [[UIWebView alloc] init];

NSString * telUrl = [NSString stringWithFormat: @ "tel: % @", phone];

NSURL * telURL = [NSURL URLWithString: telUrl]; // seemingly tel: // or tel: OK

[CallWebview loadRequest: [NSURLRequest requestWithURL: telURL];

// Remember to add to view

[Self. view addSubview: callWebview];



"Can I call a phone number for free as I believe in iOS 8"

I heard that the new system iMessage's functional breakthroughs seem to bring a lot of pressure.

Solution: the US version locks the iPhone 4S to upgrade ios7, and then the phone number says your phone did not activate this service. How can this problem be solved?

Clothes will take one day this year

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.