美文网首页
iOS-自定义接单动画

iOS-自定义接单动画

作者: Simple_Code | 来源:发表于2018-03-01 16:22 被阅读54次

接单动画

animation.gif

调用代码:


#import "ViewController.h"
#import "SPCircleProgress.h"

@interface ViewController ()
@property(nonatomic,strong)SPCircleProgress *circleProgressView;
@end

@implementation ViewController

#pragma mark - 懒加载
- (SPCircleProgress *)circleProgressView {
    if (!_circleProgressView) {
        CGFloat xCrack = [UIScreen mainScreen].bounds.size.width/6.f;
        CGFloat yCrack = [UIScreen mainScreen].bounds.size.height/4.f;
        CGFloat itemWidth = [UIScreen mainScreen].bounds.size.width - 30.f*2;
        
        //自定义起始角度
        _circleProgressView = [[SPCircleProgress alloc] initWithFrame:CGRectMake(xCrack, yCrack, itemWidth, itemWidth)
                                                        pathBackColor:[UIColor lightGrayColor]
                                                        pathFillColor:[UIColor orangeColor]
                                                           startAngle:135
                                                          strokeWidth:20];
        _circleProgressView.frame = CGRectMake(40, 100, [UIScreen mainScreen].bounds.size.width - 40 * 2, [UIScreen mainScreen].bounds.size.width - 40 * 2);
        _circleProgressView.showPoint = YES;
        _circleProgressView.showProgressText = NO;
        _circleProgressView.reduceValue = 90;
        _circleProgressView.hidden = NO;
    }
    return _circleProgressView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [self.view addSubview:self.circleProgressView];
    self.circleProgressView.alltime = 100;
    self.circleProgressView.progress = 1;
    self.circleProgressView.endTime = ^{
        NSLog(@"%@",@"计时结束");
    };
}

源码请查看

相关文章

  • iOS-自定义接单动画

    接单动画 调用代码: 源码请查看

  • iOS-自定义转场动画

    从iOS 7开始,自定义转场动画变得非常方便,无论是以模态形式呈现视图控制器,还是使用导航控制器或是选项卡...

  • iOS-自定义转场动画

    iOS中推出控制器的方式有两种:push和present,iOS的push动画基本上已经成为苹果的一个标志,最好不...

  • 业扩宝Bug

    1、接单页面,接单按钮在确认接单 数据返回之前不可用,数据返回后可用。 2、自定义分页应用,每次切换状态statu...

  • ### 仿小影图片选择

    项目准备 iOS-保存图片到自定义相册MSTImagePickerController利用Photos 框架搭建美...

  • 随手记

    核心动画翻译https://zsisme.gitbooks.io/ios-/content/chapter14/l...

  • 随手记

    核心动画翻译https://zsisme.gitbooks.io/ios-/content/chapter14/l...

  • 2019-07-15

    iOS高级核心动画技巧 浏览地址:https://zsisme.gitbooks.io/ios-/content/...

  • 感觉有用的文章留存

    0.ios核心动画高级技巧https://zsisme.gitbooks.io/ios-/content/inde...

  • 自定义转场动画进阶

    交互动画的优先级比 不交互动画高 UINavigation 自定义动画 Tabbar自定义动画 非交互动画 交互动画

网友评论

      本文标题:iOS-自定义接单动画

      本文链接:https://www.haomeiwen.com/subject/vtzwxftx.html