|
@@ -43,27 +43,8 @@
|
|
|
_uploadFileRoutelabel = [[UILabel alloc] init];
|
|
|
_uploadFileRoutelabel.font = [UIFont systemFontOfSize:14.0];
|
|
|
_uploadFileRoutelabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
|
|
|
-
|
|
|
- NSString *savePath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
|
|
|
- if(!savePath||savePath.length == 0){
|
|
|
- savePath = Const_default_upload_path;
|
|
|
- }
|
|
|
-
|
|
|
- NSString *uploadDefaultPath = savePath;
|
|
|
-
|
|
|
- if([uploadDefaultPath containsString:@"mnt/media_rw"]){
|
|
|
- uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
|
|
|
- }
|
|
|
- else if([uploadDefaultPath containsString:@"storage/emulated/0"]){
|
|
|
- uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
|
|
|
- }
|
|
|
- else if([uploadDefaultPath containsString:@"sdcard"]){
|
|
|
- uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
|
|
|
- }
|
|
|
-
|
|
|
- _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),uploadDefaultPath];
|
|
|
-
|
|
|
[self addSubview:_uploadFileRoutelabel];
|
|
|
+ [self setSavePathDataFun];
|
|
|
|
|
|
[_uploadFileRoutelabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(15);
|
|
@@ -72,6 +53,20 @@
|
|
|
make.height.mas_equalTo(20);
|
|
|
}];
|
|
|
|
|
|
+ UIView *tapView = [[UIView alloc] init];
|
|
|
+ //tapView.backgroundColor = [UIColor redColor];
|
|
|
+ [self addSubview:tapView];
|
|
|
+
|
|
|
+ [tapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.left.mas_equalTo(0);
|
|
|
+ make.top.mas_equalTo(0);
|
|
|
+ make.right.mas_equalTo(-110);
|
|
|
+ make.bottom.mas_equalTo(10);
|
|
|
+ }];
|
|
|
+
|
|
|
+ UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapBottomViewFun)];
|
|
|
+ [tapView addGestureRecognizer:tap];
|
|
|
+
|
|
|
//图片上传
|
|
|
NSString* curImgUploadStr = [[NSString alloc] initWithFormat:@"%@ %@",@" ",NSLocalizedString(@"my_set_no_File_upload",nil)];
|
|
|
|
|
@@ -201,11 +196,32 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (void)setSavePathDataFun
|
|
|
+{
|
|
|
+ NSString *savePath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
|
|
|
+ if(!savePath||savePath.length == 0){
|
|
|
+ savePath = Const_default_upload_path;
|
|
|
+ }
|
|
|
+
|
|
|
+ NSString *uploadDefaultPath = savePath;
|
|
|
+
|
|
|
+ if([uploadDefaultPath containsString:@"mnt/media_rw"]){
|
|
|
+ uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
|
|
|
+ }
|
|
|
+ else if([uploadDefaultPath containsString:@"storage/emulated/0"]){
|
|
|
+ uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
|
|
|
+ }
|
|
|
+ else if([uploadDefaultPath containsString:@"sdcard"]){
|
|
|
+ uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
|
|
|
+ }
|
|
|
+
|
|
|
+ _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),uploadDefaultPath];
|
|
|
+}
|
|
|
#pragma mark 按钮点击
|
|
|
- (void)didClickButFun:(UIButton*)but
|
|
|
{
|
|
|
if(_isExtraFileAndNotFindPathType){
|
|
|
- [[iToast makeAttrText:NSLocalizedString(@"upload_file_and_not_path_tip",nil)] show];
|
|
|
+ [[iToast makeText:NSLocalizedString(@"upload_file_and_not_path_tip",nil)] show];
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -215,4 +231,12 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (void)tapBottomViewFun
|
|
|
+{
|
|
|
+ if(_didClickbottomFun)
|
|
|
+ {
|
|
|
+ _didClickbottomFun();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
@end
|