iOS啟動(dòng)頁倒計(jì)時(shí)跳過按鈕功能
WSDrawCircleProgress, 根據(jù)UIBezierPath和CAShapeLayer自定義倒計(jì)時(shí)進(jìn)度條,適用于app啟動(dòng)的時(shí)候設(shè)置一個(gè)倒計(jì)時(shí)關(guān)閉啟動(dòng)頁面??梢栽O(shè)置進(jìn)度條顏色,填充顏色,進(jìn)度條寬度以及點(diǎn)擊事件等。
公共方法:
//set track color @property (nonatomic,strong)UIColor *trackColor; //set progress color @property (nonatomic,strong)UIColor *progressColor; //set track background color @property (nonatomic,strong)UIColor *fillColor; //set progress line width @property (nonatomic,assign)CGFloat lineWidth; //set progress duration @property (nonatomic,assign)CGFloat animationDuration; /** * set complete callback * * @param lineWidth line width * @param block block * @param duration time */ - (void)startAnimationDuration:(CGFloat)duration withBlock:(DrawCircleProgressBlock )block;
使用:
- (void)viewDidLoad { [super viewDidLoad]; [self.view addSubview:self.imageView]; DrawCircleProgressButton *drawCircleView = [[DrawCircleProgressButton alloc]initWithFrame:CGRectMake(self.view.frame.size.width - 55, 30, 40, 40)]; drawCircleView.lineWidth = 2; [drawCircleView setTitle:@"跳過" forState:UIControlStateNormal]; [drawCircleView setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; drawCircleView.titleLabel.font = [UIFont systemFontOfSize:14]; [drawCircleView addTarget:self action:@selector(removeProgress) forControlEvents:UIControlEventTouchUpInside]; /** * progress 完成時(shí)候的回調(diào) */ __weak ViewController *weakSelf = self; [drawCircleView startAnimationDuration:5 withBlock:^{ [weakSelf removeProgress]; }]; [self.view addSubview:drawCircleView]; }
相關(guān)文章
iOS實(shí)現(xiàn)圖片壓縮的兩種方法及圖片壓縮上傳功能
ios 圖片壓縮有兩種方法,分別是,壓縮圖片質(zhì)量(Quality),壓縮圖片尺寸(Size),非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友參考下2017-01-01ios UITableView實(shí)現(xiàn)無數(shù)據(jù)加載占位圖片
這篇文章主要介紹了ios UITableView實(shí)現(xiàn)無數(shù)據(jù)占位圖片,具有一定的參考價(jià)值,有興趣的可以了解一下2017-08-08iOS Xcode升級(jí)Xcode15報(bào)錯(cuò)SDK does not contain
這篇文章主要為大家介紹了iOS Xcode 升級(jí)Xcode15報(bào)錯(cuò): SDK does not contain 'libarclite'解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-11-11iOS NSURLSessionDownloadTask實(shí)現(xiàn)文件斷點(diǎn)下載的方法
本篇文章主要介紹了iOS NSURLSessionDownloadTask實(shí)現(xiàn)文件斷點(diǎn)下載的方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-01-01

IOS UI學(xué)習(xí)教程之使用UIImageView控件制作動(dòng)畫