|
|
@@ -15,13 +15,41 @@
|
|
|
|
|
|
- (id)initWithFrame:(CGRect)frame{
|
|
|
self = [super initWithFrame:frame];
|
|
|
- self.backgroundColor = [UIColor hwColor:@"#000000" alpha:0.6];
|
|
|
- [self drawAnyView];
|
|
|
+ [self checkDidHadUploadTaskFun];
|
|
|
+ //[self drawAnyView];
|
|
|
return self;
|
|
|
}
|
|
|
|
|
|
+-(void)checkDidHadUploadTaskFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ [[uploadFileManager shareInstance] getDataInDatabaseFun:YES complete:^(NSMutableArray * _Nonnull Arr) {
|
|
|
+ mainBlock(^{
|
|
|
+ if(Arr && Arr.count== 3){
|
|
|
+ NSArray *uploadingArr = Arr.firstObject;
|
|
|
+ if(uploadingArr.count == 0){
|
|
|
+ [weakSelf drawAnyView];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [[iToast makeText:NSLocalizedString(@"upload_task_not_done_tip",nil)] show];
|
|
|
+ if(self->_didClickCloseFun){
|
|
|
+ self->_didClickCloseFun();
|
|
|
+ }
|
|
|
+ [weakSelf removeFromSuperview];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [weakSelf drawAnyView];
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
- (void)drawAnyView{
|
|
|
|
|
|
+ self.backgroundColor = [UIColor hwColor:@"#000000" alpha:0.6];
|
|
|
+
|
|
|
UIView *whiteBgView = [[UIView alloc] init];
|
|
|
whiteBgView.backgroundColor = [UIColor whiteColor];
|
|
|
[self addSubview:whiteBgView];
|