Objective c 在目标c中的Wkwebview之前加载活动指示器

Objective c 在目标c中的Wkwebview之前加载活动指示器,objective-c,Objective C,我正在使用wkwebview并在objective c中加载url。我需要在加载wkwebview之前显示活动指示器。wkwebview是否有任何委托方法 -(void)viewWillAppear:(BOOL)animated{ UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhi

我正在使用wkwebview并在objective c中加载url。我需要在加载wkwebview之前显示活动指示器。wkwebview是否有任何委托方法

-(void)viewWillAppear:(BOOL)animated{
    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    [spinner setCenter:CGPointMake(160,124)];
    [self.view addSubview:spinner];
    spinner.tag = 100;
    [spinner startAnimating];


    _homeWebView.opaque = true;
   // http://ispatialtec.com/birdathon.php
    _homeWebView.userInteractionEnabled = true;
    [_homeWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.adbirdathon.ae/Birdathon/index.html"]]];
    [spinner stopAnimating];
}

是,有
WKNavigationDelegate
方法

-(无效)网络视图:(WKWebView*)网络视图完成导航:(WKNavigation*)导航


因此,请在此处移除微调器。

web视图在加载时具有真实的加载属性。它还有一个导航委托,在请求完成后发送。是否可以在视图出现之前显示活动指示器并调用?因为webview在视图中加载时需要花费一些时间。。。