DMSubmitView
一个提交进度HUD视图
CocoaPods
- 在您的 Podfile 中添加
pod 'DMSubmitView'
- 运行
pod install
或pod update
渲染
如何使用
-
初始化视图
_sub = [[SubmitView alloc] initWithFrame:CGRectMake(0, 0, 300, 60)]; _sub.center = self.view.center; _sub.delegate = self; [self.view addSubview:_sub];
-
更新进度
[self.sub updateProgressViewWitCurrenthData:currentCount totalData:totalCount];
主要方法
DMSubmitView
@protocol DMSubmitViewDelegate <NSObject>
@optional
//the view is start show progress view call back
- (void)submitViewStartShowProgressViewStatus;
@end
@interface DMSubmitView : UIView
//delegaet
@property (nonatomic, weak) id <DMSubmitViewDelegate> delegate;
//current progress float
@property (nonatomic, assign, readonly) CGFloat currentProgressFloat;
//current total float
@property (nonatomic, assign, readonly) CGFloat totalProgressFloat;
//update pregress view
//更新进度
- (void)updateProgressViewWitCurrenthData:(CGFloat)currentData totalData:(CGFloat)totalData;
DMProgressView
-
也可以在你的项目中使用圆形进度条
@protocol DMProgressViewDelegate <NSObject> @optional // the progress circle is completion call back - (void)progressViewCompletionCallBack; @end @interface DMProgressView : UIView //line width @property(nonatomic, assign) CGFloat arcLineWith; //delegate @property (nonatomic, weak) id <DMProgressViewDelegate> delegate; /* * init */ - (DMProgressView *)initWithProgressViewWithFrame:(CGRect)frame timeout:(CGFloat)timeout radius:(CGFloat)radius layerWith:(CGFloat)layerWith; /* * 更新进度 */ - (void)updateProgressViewWitCurrenthData:(CGFloat)currentData totalData:(CGFloat)totalData;