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

修复禁止预览的功能

parent b9c2e334
...@@ -33,6 +33,7 @@ typedef enum : NSUInteger { ...@@ -33,6 +33,7 @@ typedef enum : NSUInteger {
@property (nonatomic, copy) NSString *photoDefImageName; @property (nonatomic, copy) NSString *photoDefImageName;
@property (nonatomic, assign) BOOL showSelectBtn; @property (nonatomic, assign) BOOL showSelectBtn;
@property (assign, nonatomic) BOOL allowPreview;
@end @end
......
...@@ -230,7 +230,11 @@ ...@@ -230,7 +230,11 @@
- (void)layoutSubviews { - (void)layoutSubviews {
[super layoutSubviews]; [super layoutSubviews];
if (self.allowPreview) {
_selectPhotoButton.frame = CGRectMake(self.tz_width - 44, 0, 44, 44); _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); _selectImageView.frame = CGRectMake(self.tz_width - 27, 0, 27, 27);
_imageView.frame = CGRectMake(0, 0, self.tz_width, self.tz_height); _imageView.frame = CGRectMake(0, 0, self.tz_width, self.tz_height);
......
...@@ -320,7 +320,7 @@ static CGFloat itemMargin = 5; ...@@ -320,7 +320,7 @@ static CGFloat itemMargin = 5;
} }
#pragma mark - Click Event #pragma mark - Click Event
-(void)navLeftBarButtonClick{ - (void)navLeftBarButtonClick{
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
- (void)previewButtonClick { - (void)previewButtonClick {
...@@ -451,9 +451,7 @@ static CGFloat itemMargin = 5; ...@@ -451,9 +451,7 @@ static CGFloat itemMargin = 5;
cell.allowPickingGif = tzImagePickerVc.allowPickingGif; cell.allowPickingGif = tzImagePickerVc.allowPickingGif;
cell.model = model; cell.model = model;
cell.showSelectBtn = tzImagePickerVc.showSelectBtn; cell.showSelectBtn = tzImagePickerVc.showSelectBtn;
if (!tzImagePickerVc.allowPreview) { cell.allowPreview = tzImagePickerVc.allowPreview;
cell.selectPhotoButton.frame = cell.bounds;
}
__weak typeof(cell) weakCell = cell; __weak typeof(cell) weakCell = cell;
__weak typeof(self) weakSelf = self; __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