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