zoukankan      html  css  js  c++  java
  • loading的两种常用方式

    loading的两种常用方式

    1、

        UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

        [self.tableView addSubview:loadingView];

        [loadingView startAnimating];

        // 居中

        loadingView.centerX=self.view.centerX;

        loadingView.centerY=self.tableView.height*0.4;

        self.loadingView = loadingView;

     [self.loadingView stopAnimating];

    2、

    - (void)webViewDidFinishLoad:(UIWebView *)webView {

        [MBProgressHUD hideHUDForView:self.view animated:YES];

    }

    - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {

        [MBProgressHUD hideHUDForView:self.view animated:YES];

    }

    - (void)webViewDidStartLoad:(UIWebView *)webView {

        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];

        hud.mode = MBProgressHUDModeIndeterminate;

        hud.labelText = @"Loading...";

    }

  • 相关阅读:
    python os的一些用法(-)
    python常用函数 time.strftime
    centos7 解压rar 文件
    centos7 开机启动设置
    python基础之Day15
    python基础之Day13
    python基础之Day12
    python基础之Day11
    python基础之Day10
    python基础之Day9
  • 原文地址:https://www.cnblogs.com/luseike/p/4251009.html
Copyright © 2011-2022 走看看