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

    用处:进度条视图,用来显示某个任务的当前状态

    -(void)viewDidLoad

    {

      [self viewDidLoad];

      self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(change:) userInfo:nil repeats:YES];

         self.pv = [[UIProgressView alloc]initWithProgressViewStyle:UIProgressViewStyleDefault];

      

      self.pv.frame = CGMake(20,20,100,20);

      //进度颜色

      self.pv.progressTintColor = [UIColor redColor];

      //底色颜色

      self.pv.trackTintColor = [UIColor greenColor];

      //当前进度

      self.pv.progress = 0.0;

      [self.view addSubView:self.pv];

    }

    -(IBAction) change:(NSTimer*)myTimer

    {

      self.pv.progress +=0.1;

      [self.timer invalidate];

    }

  • 相关阅读:
    如何开启无线网卡
    E-SATA接口
    sata express接口
    联想服务器驱动
    国家信息安全漏洞共享平台
    SQL SERVER 性能调优
    计算机网络知识库
    CCNP 视频
    ORACLE 培训 -相克军
    phxsql
  • 原文地址:https://www.cnblogs.com/AngryCooder/p/3897006.html
Copyright © 2011-2022 走看看