zoukankan      html  css  js  c++  java
  • iOS WKWebView 使用笔记

    首先添加Webkit框架

    导入#import <WebKit/WebKit.h>

    #import <WebKit/WebKit.h> 
    
    @interface WebBrowerViewController ()<WKNavigationDelegate>
    
    @property(nonatomic,strong) WKWebView *webView;
    
    @end
    
    @implementation WebBrowerViewController
    
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view.
        
        [self.view addSubview:self.webView];
        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.baidu.com"]]];
    }
    
    
    -(WKWebView *)webView
    {
        if (!_webView) {
            _webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
            _webView.navigationDelegate = self;
        }
        return _webView;
    }
    
    
    //1.1.1 页面开始加载时调用
    -(void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
    {
        NSLog(@"页面开始加载...");
    }
    
    //1.1.2 当内容开始返回时调用
    - (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation
    {
        NSLog(@"内容开始返回...");
    }
    
    //1.1.3 页面加载完成之后调用
    -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
    {
        NSLog(@"页面加载完成...");
    }
    
    //1.1.4 页面加载失败时调用
    -(void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
    {
        NSLog(@"页面加载失败...");
    }
    
    @end
    
  • 相关阅读:
    Tsar 服务器系统和应用信息的采集报告工具
    mysqltuner
    MySQL性能监控工具-MONyog
    tuning-primer.sh mysql 报表
    mytop
    InnoTop
    mysql监控管理工具--innotop
    iotop,pt-ioprofile : mysql IO负载高的来源定位
    PERCONA-TOOLKIT 工具的安装与使用2
    PERCONA-TOOLKIT : pt-ioprofile分析IO情况
  • 原文地址:https://www.cnblogs.com/sixindev/p/4756703.html
Copyright © 2011-2022 走看看