|
|
@@ -99,6 +99,7 @@
|
|
|
#pragma mark 数据处理
|
|
|
- (void)setIndexPathsForSelectedItems:(NSMutableArray *)indexPathsForSelectedItems
|
|
|
{
|
|
|
+ BOOL isCanUpload = YES;
|
|
|
|
|
|
_indexPathsForSelectedItems = indexPathsForSelectedItems;
|
|
|
if(!_indexPathsForSelectedItems){
|
|
|
@@ -121,6 +122,10 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if(allImageData > self.available && self.available > 1024){
|
|
|
+ isCanUpload = NO;
|
|
|
+ }
|
|
|
+
|
|
|
allImageData /= 1024;
|
|
|
|
|
|
NSString *byteStr = nil;
|
|
|
@@ -149,7 +154,13 @@
|
|
|
NSMutableAttributedString *noteStr = [[NSMutableAttributedString alloc] initWithString:totalStr];
|
|
|
|
|
|
NSRange redRange = NSMakeRange([totalStr rangeOfString:curStr2].location, [totalStr rangeOfString:curStr2].length);
|
|
|
- [noteStr addAttribute:NSForegroundColorAttributeName value:[UIColor hwColor:@"#959799" alpha:1.0] range:redRange];
|
|
|
+
|
|
|
+ UIColor *noteColor =[UIColor hwColor:@"#959799" alpha:1.0];
|
|
|
+ if(!isCanUpload){
|
|
|
+ noteColor = [UIColor redColor];
|
|
|
+ }
|
|
|
+
|
|
|
+ [noteStr addAttribute:NSForegroundColorAttributeName value:noteColor range:redRange];
|
|
|
[noteStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14.0] range:redRange];
|
|
|
// 设置行间距
|
|
|
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
@@ -159,7 +170,7 @@
|
|
|
|
|
|
_selectNumLabel.attributedText = noteStr;
|
|
|
|
|
|
- if(_indexPathsForSelectedItems.count > 0){
|
|
|
+ if(_indexPathsForSelectedItems.count > 0 && isCanUpload){
|
|
|
self.uploadButon.enabled = YES;
|
|
|
self.uploadButon.alpha = 1;
|
|
|
}
|