zoukankan      html  css  js  c++  java
  • 带有背景显示加载中的activity

    直接调用可以出现一个加载框视图

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    +(UIView *)LoadingView
    {
        AppDelegate* del = (AppDelegate*)[[UIApplication sharedApplication] delegate];
        CGFloat rect = [UIScreen mainScreen].bounds.size.height;
        CGFloat rect2 = [UIScreen mainScreen].bounds.size.width;
        UIView* backgroudview = [[UIView alloc] initWithFrame:CGRectMake(rect2/2 40, rect/2 408080)];
        backgroudview.backgroundColor = [UIColor blackColor];
        backgroudview.alpha 0.4;
        backgroudview.layer.cornerRadius 6;
        backgroudview.layer.masksToBounds YES;
         
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(1026020)];
        label.text @"请稍后...";
        label.textColor = [UIColor whiteColor];
        label.font = [UIFont boldSystemFontOfSize:15];
        label.adjustsFontSizeToFitWidth YES;
         
        UIActivityIndicatorView* act = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(22353636)];
        act.activityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteLarge;
        [act startAnimating];
        [backgroudview addSubview:act];
        [backgroudview addSubview:label];
         
         
        [del.nav.topViewController.view addSubview:backgroudview];
         
        return backgroudview;
    }
     
  • 相关阅读:
    oracle中pro*c的学习
    影响因子最大的国外计算机科学期刊50种
    eclipse3.6安装subversive插件
    WebLogic、WebSphere、JBOSS、Tomcat之间的区别
    hibernate.hbm.xml详解
    DotSpatial
    FLARtoolkit技巧:使用彩色marker
    全新体验 腾讯正式发布Sliverlight QQ
    ARToolKit技术视频欣赏
    写给未来的妻子你
  • 原文地址:https://www.cnblogs.com/ranger-jlu/p/3877702.html
Copyright © 2011-2022 走看看