IOS network analysis-(12 UIWebView Introduction), iosuiwebview

Source: Internet
Author: User

IOS network analysis-(12 UIWebView Introduction), iosuiwebview

In this article, we only need to know what UIWebView is.

UIWebView is a UI control provided by Apple to display webpages. It is also the most memory-occupied control.

After iOS8.0, A webkit framework emerged. WKWebView saves 1/4 ~ compared with UIWebView ~ 1/3 of memory, fast, but no cache function.

For some shopping app web pages, it is essential to display them. Therefore, UIWebView is also a space for us to be proficient in singing.

The following is a brief introduction to UIWebView.

 

/// ViewController. m // CX-UIWebView /// Created by ma c on 16/3/23. // Copyright©2016 xubaoaichiyu. all rights reserved. // # import "ViewController. h "@ interface ViewController () <UIWebViewDelegate> @ property (nonatomic, strong) UIWebView * webView; @ end @ implementation ViewController-(void) viewDidLoad {[super viewDidLoad]; // initialize webView _ webView = [[UIWebView alloc] initWithFrame: CGRectMake (0, 20, self. view. frame. size. width, CGRectGetHeight (self. view. frame)-60)]; NSURL * url = [NSURL URLWithString: @ "http://www.baidu.com"]; [_ webView loadRequest: [NSURLRequest requestWithURL: url]; // Add webView to View [self. view addSubview: _ webView];}/*-(void) reload; refresh-(void) stopLoading; stop load-(void) goBack; Return-(void) goForward; forward */@ end

 

Related Article

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.