修复发布动态选择图片bug
This commit is contained in:
@@ -192,7 +192,6 @@
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textColor = UIColor.whiteColor;
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_titleLabel.numberOfLines = 5;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
@@ -218,7 +217,6 @@
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.textColor = UIColor.whiteColor;
|
||||
_nickLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_nickLabel.numberOfLines = 5;
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
@@ -238,7 +238,11 @@
|
||||
XPMonentsPublishCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMonentsPublishCollectionViewCell class]) forIndexPath:indexPath];
|
||||
UIImage * image = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
if (indexPath.row == (self.datasource.count -1)) {
|
||||
cell.isShowDelete = self.datasource.count == 9;
|
||||
if (image == self.addPicImage) {
|
||||
cell.isShowDelete = NO;
|
||||
}else{
|
||||
cell.isShowDelete = YES;
|
||||
}
|
||||
} else {
|
||||
cell.isShowDelete = YES;
|
||||
}
|
||||
@@ -249,7 +253,7 @@
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
if (indexPath.row == (self.datasource.count -1) && self.datasource.count != 9) {
|
||||
if (indexPath.row == (self.datasource.count -1) && self.originAssets.count != 9) {
|
||||
[self.textView resignFirstResponder];
|
||||
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
|
||||
imagePickerVc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
@@ -274,7 +278,9 @@
|
||||
if (indexPath.row < self.originAssets.count) {
|
||||
[self.originAssets removeObjectAtIndex:indexPath.row];
|
||||
}
|
||||
|
||||
if (![self.datasource containsObject:self.addPicImage]) {
|
||||
[self.datasource addObject:self.addPicImage];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
if (self.datasource.count > 1) {
|
||||
self.isEdited = YES;
|
||||
|
Reference in New Issue
Block a user