一句話調用水波浪圓環倒計時

//  wsqflyWaveProgressView.h

//

//

//  Created by webapps on 2017/4/13.

//  Copyright © 2017 tanyang. All rights reserved.

//


#import <UIKit/UIKit.h>


typedef NS_ENUM(NSUInteger, WSQWaveProgressViewType) {

    WSQWaveProgressViewTypeUP     =  0,      //上升

    WSQWaveProgressViewTypeDOWN   =  1      //下降

};


@interface wsqflyWaveProgressView :UIView


//添加一些說明之類的

@property (nonatomic,strong)UIImageView *backgroundImageView;

@property (nonatomic,strong)UILabel *percentLabel;

@property (nonatomic,strong)UILabel *instructionsLabel;

@property (nonatomic,copy)NSString *AirImageName;//氣泡名

@property (nonatomic,strong)UIImageView *AirImage;//氣泡

/**

 調用此句開始繪製


 @param layerColor_1 水波浪顏色1

 @param layerColor_2 水波浪顏色2

 @param percent 百分比

 @param type 類型(上升還是下降)

 */

-(void)starToDrawWithLayerColor_1:(UIColor *)layerColor_1 andLayerColor_2:(UIColor *)layerColor_2 andPercent:(CGFloat)percent andType:(WSQWaveProgressViewType)type;



/**

 開啓泡泡

 */

-(void)startAirPaoPao;


/**

 停止泡泡

 */

-(void)stopAirPaoPao;



//

//  wsqflyWaveProgressView.m

//  

//

//  Created by webapps on 2017/4/13.

//  Copyright © 2017 tanyang. All rights reserved.

//


#import "wsqflyWaveProgressView.h"


@interface wsqflyWaveProgressView ()


@property (nonatomic, strong)   UIColor *waveColor_1;    // 第一個波浪顏色


@property (nonatomic, strong)   UIColor *waveColor_2;   // 第二個波浪顏色


@property (nonatomic, assign)   CGFloat percent;            // 百分比


@property (nonatomic, assign)   CGFloat  isUp;  // 上升的模式(1 0 降)


//viewe 添加layer 添加兩個是爲了形成交叉點波浪

@property (nonatomic, strong) CAShapeLayer *layer_1;

@property (nonatomic, strong) CAShapeLayer *layer_2;




更多詳細代碼(完整dome):http://download.csdn.net/detail/qq_33646395/9813987


發佈了32 篇原創文章 · 獲贊 23 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章