8000 GitHub - MyCode-Star/BSYProgressView
[go: up one dir, main page]

Skip to content

MyCode-Star/BSYProgressView

Repository files navigation

BSYProgressView

@interface ViewController () { UIButton *_button; } @end

@implementation ViewController

  • (void)viewDidLoad { [super viewDidLoad];

    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [ button setTitle:@"点击加进度" forState:UIControlStateNormal]; [button setBackgroundColor:[UIColor redColor]]; button.frame = CGRectMake(100, 300, 100, 100); [self.view addSubview:button]; [button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside]; _button = button; // Do any additional setup after loading the view, typically from a nib.

    BSYView *circleProgress = [[BSYView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];

    circleProgress.progress = 0.00; [self.view addSubview:circleProgress]; }

-(void)buttonClick:(UIButton *)sender { static CGFloat number = 0.00; BSYView *circleProgress = [[BSYView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];

if (number<=1.00) {
    number= number+0.1;
}
circleProgress.progress = number;
[self.view addSubview:circleProgress];

if (number==1.00) {
    _button.enabled = NO;
}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0