In this essay, we just need to know what UIWebView is.
UIWebView is a UI control provided by Apple to display a Web page, and it is also the most memory-occupying control.
iOS8.0 after the WebKit framework, Wkwebview compared to UIWebView save 1/4~1/3 memory, fast, but no cache function.
For the display of some shopping app pages is inevitable, so uiwebview for us also should be proficient in the song space.
Let's give you a brief introduction of 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, Self.view.frame.size.width, Cgrectgetheight (Self.view.frame)]; 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
An analysis of the IOS network-(12 UIWebView introduction)