ASProgressPopUpView

ASProgressPopUpView

https://github.com/alskipp/ASProgressPopUpView

 

效果:

-使用-

将源码拖入工程当中:


//
//  RootViewController.m
//  Progress
//
//  Copyright (c) 2014年 Y.X. All rights reserved.
//

#import "RootViewController.h"
#import "ASPopUpView.h"
#import "ASProgressPopUpView.h"
#import "YXGCD.h"

@interface RootViewController ()

@property (nonatomic, strong) ASProgressPopUpView *progressView1;
@property (nonatomic, strong) ASProgressPopUpView *progressView2;
@property (nonatomic, strong) GCDTimer            *timer;

@end

@implementation RootViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    _progressView1 = [[ASProgressPopUpView alloc] initWithFrame:CGRectMake(0, 100, 320, 2)];
    
    // 设置字体
    _progressView1.font = [UIFont fontWithName:@"HelveticaNeue-Thin"
                                          size:15.f];
    
    // 设置进度条颜色
    _progressView1.popUpViewAnimatedColors = @[[UIColor redColor],
                                               [UIColor orangeColor],
                                               [UIColor greenColor]];
    
    // 显示数值百分比
    [_progressView1 showPopUpViewAnimated:YES];
    [self.view addSubview:_progressView1];
    
    // 定时器
    _timer = [[GCDTimer alloc] initInQueue:[GCDQueue mainQueue]];
    [_timer event:^{
        [_progressView1 setProgress:arc4random()%100/100.f
                           animated:YES];
    } timeInterval:NSEC_PER_SEC];
    [_timer start];
}

@end

看了下源码,发现用的是CoreAnimation实现了所有的动画效果,高大上啊.

这个方法还没用过:

TextLayer

这个都不知道是干啥用的.....

这绝对是学习CoreAnimation的绝好教材.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值