Commit ab382df2 authored by yuzheng.tz's avatar yuzheng.tz

让photoWidth属性的设置生效

parent 6efec520
......@@ -26,6 +26,8 @@
/// Default is 600px / 默认600像素宽
@property (nonatomic, assign) CGFloat photoPreviewMaxWidth;
/// The pixel width of output image, Default is 828px / 导出图片的宽度,默认828像素宽
@property (nonatomic, assign) CGFloat photoWidth;
/// Default is 4, Use in photos collectionView in TZPhotoPickerController
/// 默认4列, TZPhotoPickerController中的照片collectionView
......
......@@ -49,6 +49,11 @@ static dispatch_once_t onceToken;
manager = nil;
}
- (void)setPhotoWidth:(CGFloat)photoWidth {
_photoWidth = photoWidth;
TZScreenWidth = photoWidth / 2;
}
- (void)setColumnNumber:(NSInteger)columnNumber {
_columnNumber = columnNumber;
CGFloat margin = 4;
......
......@@ -52,7 +52,7 @@
/// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
@property (nonatomic, assign) BOOL sortAscendingByModificationDate;
/// Default is 828px / 默认828像素宽
/// The pixel width of output image, Default is 828px / 导出图片的宽度,默认828像素宽
@property (nonatomic, assign) CGFloat photoWidth;
/// Default is 600px / 默认600像素宽
......
......@@ -444,6 +444,11 @@
[TZImageManager manager].photoPreviewMaxWidth = _photoPreviewMaxWidth;
}
- (void)setPhotoWidth:(CGFloat)photoWidth {
_photoWidth = photoWidth;
[TZImageManager manager].photoWidth = photoWidth;
}
- (void)setSelectedAssets:(NSMutableArray *)selectedAssets {
_selectedAssets = selectedAssets;
_selectedModels = [NSMutableArray array];
......
......@@ -214,6 +214,8 @@
}
imagePickerVc.allowTakePicture = self.showTakePhotoBtnSwitch.isOn; // 在内部显示拍照按钮
// imagePickerVc.photoWidth = 1000;
// 2. Set the appearance
// 2. 在这里设置imagePickerVc的外观
// imagePickerVc.navigationBar.barTintColor = [UIColor greenColor];
......
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