zoukankan      html  css  js  c++  java
  • UIActivityIndicatorView控件

    用处: 菊花图

    仅有两个方法:[aiv startAnimating]

           [aiv stopAnimating]

    -(void)viewDidLoad

    {

      [super viewDidLoad];

      self.aiv = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

      self.aiv.frame = CGRectMake(20,20,100,100);

      [self.view addSubView:self.aiv];

      

      self.startBtn = [[UIButton alloc]buttonWithType:UIButtonTypeRoundedRect];

      self.startBtn.frame = CGRectMake(20,100,100,50);

      [self.startBtn setTitle:@"start" forState:UIControlStateNormal];

      [self addTarget:self action:@selector(start:) forControlEvents:UIControlEventTouchUpInside];

      [self.view addSubView:self.startBtn];

    }

    -(IBAction)start:(id)sender

    {

      //UIButton* btn = (UIButton*)sender;

      [self.aiv startAnimation];

    }

  • 相关阅读:
    MRO C3算法 super的运用
    约束 抛异常
    反射
    Ubuntu
    Vim
    Vim
    Arithmetic
    Docker-常用命令
    Docker
    Docker-LAMP开发环境
  • 原文地址:https://www.cnblogs.com/AngryCooder/p/3897133.html
Copyright © 2011-2022 走看看