Commit 30ff7606 authored by yuzheng.tz's avatar yuzheng.tz

修复禁止预览的功能

parent b9c2e334
......@@ -33,6 +33,7 @@ typedef enum : NSUInteger {
@property (nonatomic, copy) NSString *photoDefImageName;
@property (nonatomic, assign) BOOL showSelectBtn;
@property (assign, nonatomic) BOOL allowPreview;
@end
......
......@@ -230,7 +230,11 @@
- (void)layoutSubviews {
[super layoutSubviews];
_selectPhotoButton.frame = CGRectMake(self.tz_width - 44, 0, 44, 44);
if (self.allowPreview) {
_selectPhotoButton.frame = CGRectMake(self.tz_width - 44, 0, 44, 44);
} else {
_selectPhotoButton.frame = self.bounds;
}
_selectImageView.frame = CGRectMake(self.tz_width - 27, 0, 27, 27);
_imageView.frame = CGRectMake(0, 0, self.tz_width, self.tz_height);
......
......@@ -320,7 +320,7 @@ static CGFloat itemMargin = 5;
}
#pragma mark - Click Event
-(void)navLeftBarButtonClick{
- (void)navLeftBarButtonClick{
[self.navigationController popViewControllerAnimated:YES];
}
- (void)previewButtonClick {
......@@ -451,9 +451,7 @@ static CGFloat itemMargin = 5;
cell.allowPickingGif = tzImagePickerVc.allowPickingGif;
cell.model = model;
cell.showSelectBtn = tzImagePickerVc.showSelectBtn;
if (!tzImagePickerVc.allowPreview) {
cell.selectPhotoButton.frame = cell.bounds;
}
cell.allowPreview = tzImagePickerVc.allowPreview;
__weak typeof(cell) weakCell = cell;
__weak typeof(self) weakSelf = self;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment