Commit fe3c8243912e8a59547e1a201b37a386d1222d23
1 parent
7c9dd834
0.0.7
Showing
23 changed files
with
45 additions
and
32 deletions
CNLiveImagePickerController.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveImagePickerController' | 10 | s.name = 'CNLiveImagePickerController' |
| 11 | - s.version = '0.0.6' | 11 | + s.version = '0.0.7' |
| 12 | s.summary = '相册' | 12 | s.summary = '相册' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveImagePickerController/Classes/CNEditVideoController.m
| @@ -101,14 +101,14 @@ | @@ -101,14 +101,14 @@ | ||
| 101 | self.layer.borderWidth = 2; | 101 | self.layer.borderWidth = 2; |
| 102 | self.layer.borderColor = [UIColor clearColor].CGColor; | 102 | self.layer.borderColor = [UIColor clearColor].CGColor; |
| 103 | 103 | ||
| 104 | - _leftView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"video_edit_left"]]; | 104 | + _leftView = [[UIImageView alloc] initWithImage:[UIImage imageNamedFromMyBundle:@"video_edit_left"]]; |
| 105 | _leftView.userInteractionEnabled = YES; | 105 | _leftView.userInteractionEnabled = YES; |
| 106 | _leftView.tag = 0; | 106 | _leftView.tag = 0; |
| 107 | UIPanGestureRecognizer *lg = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)]; | 107 | UIPanGestureRecognizer *lg = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)]; |
| 108 | [_leftView addGestureRecognizer:lg]; | 108 | [_leftView addGestureRecognizer:lg]; |
| 109 | [self addSubview:_leftView]; | 109 | [self addSubview:_leftView]; |
| 110 | 110 | ||
| 111 | - _rightView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"video_edit_right"]]; | 111 | + _rightView = [[UIImageView alloc] initWithImage:[UIImage imageNamedFromMyBundle:@"video_edit_right"]]; |
| 112 | _rightView.userInteractionEnabled = YES; | 112 | _rightView.userInteractionEnabled = YES; |
| 113 | _rightView.tag = 1; | 113 | _rightView.tag = 1; |
| 114 | UIPanGestureRecognizer *rg = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)]; | 114 | UIPanGestureRecognizer *rg = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)]; |
CNLiveImagePickerController/Classes/CNImagePickerController.m
| @@ -50,9 +50,9 @@ | @@ -50,9 +50,9 @@ | ||
| 50 | self.iconThemeColor = RGBOF(0x00BBE06);// 主体颜色 | 50 | self.iconThemeColor = RGBOF(0x00BBE06);// 主体颜色 |
| 51 | self.showPhotoCannotSelectLayer = YES;//达到上限是否有浮层 | 51 | self.showPhotoCannotSelectLayer = YES;//达到上限是否有浮层 |
| 52 | self.cannotSelectLayerColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];//设置达到上限的浮层 | 52 | self.cannotSelectLayerColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];//设置达到上限的浮层 |
| 53 | - self.photoDefImage = [UIImage imageNamed:@"photo_cell_normal"]; | 53 | + self.photoDefImage = [UIImage imageNamedFromMyBundle:@"photo_cell_normal"]; |
| 54 | self.photoSelImage = [UIImage qmui_imageWithColor:RGBOF(0x0BBE06) size:CGSizeMake(22, 22) cornerRadius:11]; | 54 | self.photoSelImage = [UIImage qmui_imageWithColor:RGBOF(0x0BBE06) size:CGSizeMake(22, 22) cornerRadius:11]; |
| 55 | - self.photoOriginDefImage = [UIImage imageNamed:@"photo_original_nor"]; | 55 | + self.photoOriginDefImage = [UIImage imageNamedFromMyBundle:@"photo_original_nor"]; |
| 56 | 56 | ||
| 57 | // 3. Set allow picking video & photo & originalPhoto or not | 57 | // 3. Set allow picking video & photo & originalPhoto or not |
| 58 | // 3. 设置是否可以选择视频/图片/原图/gif(未开放) | 58 | // 3. 设置是否可以选择视频/图片/原图/gif(未开放) |
| @@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
| 88 | // 自定义导航栏上的返回按钮 | 88 | // 自定义导航栏上的返回按钮 |
| 89 | /* | 89 | /* |
| 90 | [imagePickerVc setNavLeftBarButtonSettingBlock:^(UIButton *leftButton){ | 90 | [imagePickerVc setNavLeftBarButtonSettingBlock:^(UIButton *leftButton){ |
| 91 | - [leftButton setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal]; | 91 | + [leftButton setImage:[UIImage imageNamedFromMyBundle:@"back"] forState:UIControlStateNormal]; |
| 92 | [leftButton setImageEdgeInsets:UIEdgeInsetsMake(0, -10, 0, 20)]; | 92 | [leftButton setImageEdgeInsets:UIEdgeInsetsMake(0, -10, 0, 20)]; |
| 93 | }]; | 93 | }]; |
| 94 | imagePickerVc.delegate = self; | 94 | imagePickerVc.delegate = self; |
| @@ -102,7 +102,7 @@ | @@ -102,7 +102,7 @@ | ||
| 102 | self.naviTitleColor = RGBOF(0x282828);//相册title | 102 | self.naviTitleColor = RGBOF(0x282828);//相册title |
| 103 | self.naviTitleFont = [UIFont fontWithName:@"PingFangSC-Medium" size:18];//title文字大小 | 103 | self.naviTitleFont = [UIFont fontWithName:@"PingFangSC-Medium" size:18];//title文字大小 |
| 104 | [self setNavLeftBarButtonSettingBlock:^(UIButton *leftButton) {//设置返回按钮图标 | 104 | [self setNavLeftBarButtonSettingBlock:^(UIButton *leftButton) {//设置返回按钮图标 |
| 105 | - [leftButton setImage:[UIImage imageNamed:@"photo_back"] forState:UIControlStateNormal];//返回按钮图片 | 105 | + [leftButton setImage:[UIImage imageNamedFromMyBundle:@"photo_back"] forState:UIControlStateNormal];//返回按钮图片 |
| 106 | [leftButton setTitle:@"返回" forState:UIControlStateNormal];//设置文字大小 | 106 | [leftButton setTitle:@"返回" forState:UIControlStateNormal];//设置文字大小 |
| 107 | [leftButton setTitleColor:RGBOF(0x282828) forState:UIControlStateNormal];//设置文字颜色 | 107 | [leftButton setTitleColor:RGBOF(0x282828) forState:UIControlStateNormal];//设置文字颜色 |
| 108 | leftButton.titleLabel.font = [UIFont systemFontOfSize:15];//设置文字大小 | 108 | leftButton.titleLabel.font = [UIFont systemFontOfSize:15];//设置文字大小 |
| @@ -130,9 +130,9 @@ | @@ -130,9 +130,9 @@ | ||
| 130 | [previewButton setTitleColor:RGBOF(0x000000) forState:UIControlStateNormal];//默认 | 130 | [previewButton setTitleColor:RGBOF(0x000000) forState:UIControlStateNormal];//默认 |
| 131 | 131 | ||
| 132 | //原图按钮 | 132 | //原图按钮 |
| 133 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_normal"] forState:UIControlStateDisabled];//禁用 | ||
| 134 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_normal"] forState:UIControlStateNormal];//默认 | ||
| 135 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_select"] forState:UIControlStateSelected];//选中 | 133 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_normal"] forState:UIControlStateDisabled];//禁用 |
| 134 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_normal"] forState:UIControlStateNormal];//默认 | ||
| 135 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_select"] forState:UIControlStateSelected];//选中 | ||
| 136 | originalPhotoButton.titleLabel.font = [UIFont systemFontOfSize:16]; | 136 | originalPhotoButton.titleLabel.font = [UIFont systemFontOfSize:16]; |
| 137 | [originalPhotoButton setTitleColor:RGBOF(0xB3B3B3) forState:UIControlStateDisabled]; | 137 | [originalPhotoButton setTitleColor:RGBOF(0xB3B3B3) forState:UIControlStateDisabled]; |
| 138 | [originalPhotoButton setTitleColor:RGBOF(0x000000) forState:UIControlStateNormal]; | 138 | [originalPhotoButton setTitleColor:RGBOF(0x000000) forState:UIControlStateNormal]; |
| @@ -169,16 +169,16 @@ | @@ -169,16 +169,16 @@ | ||
| 169 | [self setPhotoPreviewPageUIConfigBlock:^(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel) { | 169 | [self setPhotoPreviewPageUIConfigBlock:^(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel) { |
| 170 | 170 | ||
| 171 | //返回按钮 | 171 | //返回按钮 |
| 172 | - [backButton setImage:[UIImage imageNamed:@"photo_original_back"] forState:UIControlStateNormal]; | 172 | + [backButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_back"] forState:UIControlStateNormal]; |
| 173 | //选择按钮 | 173 | //选择按钮 |
| 174 | - [selectButton setImage:[UIImage imageNamed:@"photo_original_nor"] forState:UIControlStateNormal]; | 174 | + [selectButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_nor"] forState:UIControlStateNormal]; |
| 175 | [selectButton setImage:[UIImage qmui_imageWithColor:RGBOF(0x0BBE06) size:CGSizeMake(28, 28) cornerRadius:14] forState:UIControlStateSelected]; | 175 | [selectButton setImage:[UIImage qmui_imageWithColor:RGBOF(0x0BBE06) size:CGSizeMake(28, 28) cornerRadius:14] forState:UIControlStateSelected]; |
| 176 | [selectButton setTitle:@"" forState:UIControlStateDisabled]; | 176 | [selectButton setTitle:@"" forState:UIControlStateDisabled]; |
| 177 | 177 | ||
| 178 | //原图按钮 | 178 | //原图按钮 |
| 179 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_normal"] forState:UIControlStateDisabled];//禁用 | ||
| 180 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_normal"] forState:UIControlStateNormal];//默认 | ||
| 181 | - [originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_select"] forState:UIControlStateSelected];//选中 | 179 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_normal"] forState:UIControlStateDisabled];//禁用 |
| 180 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_normal"] forState:UIControlStateNormal];//默认 | ||
| 181 | + [originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:@"photo_original_select"] forState:UIControlStateSelected];//选中 | ||
| 182 | originalPhotoButton.titleLabel.font = [UIFont systemFontOfSize:16]; | 182 | originalPhotoButton.titleLabel.font = [UIFont systemFontOfSize:16]; |
| 183 | [originalPhotoButton setTitleColor:RGBOF(0xB3B3B3) forState:UIControlStateDisabled]; | 183 | [originalPhotoButton setTitleColor:RGBOF(0xB3B3B3) forState:UIControlStateDisabled]; |
| 184 | [originalPhotoButton setTitleColor:RGBAOF(0xFFFFFF, 0.7) forState:UIControlStateNormal]; | 184 | [originalPhotoButton setTitleColor:RGBAOF(0xFFFFFF, 0.7) forState:UIControlStateNormal]; |
| @@ -244,8 +244,7 @@ | @@ -244,8 +244,7 @@ | ||
| 244 | }]; | 244 | }]; |
| 245 | //相簿 | 245 | //相簿 |
| 246 | [self setAlbumCellDidSetModelBlock:^(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel) { | 246 | [self setAlbumCellDidSetModelBlock:^(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel) { |
| 247 | - [posterImageView setBackgroundColor:[UIColor blueColor]]; | ||
| 248 | - [posterImageView setBackgroundColor:[UIColor blueColor]]; | 247 | + [posterImageView setBackgroundColor:[UIColor whiteColor]]; |
| 249 | 248 | ||
| 250 | }]; | 249 | }]; |
| 251 | 250 | ||
| @@ -266,7 +265,7 @@ | @@ -266,7 +265,7 @@ | ||
| 266 | }]; | 265 | }]; |
| 267 | //图片预览 | 266 | //图片预览 |
| 268 | [self setPhotoPreviewPageDidLayoutSubviewsBlock:^(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel) { | 267 | [self setPhotoPreviewPageDidLayoutSubviewsBlock:^(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel) { |
| 269 | - | 268 | + [backButton setImage:[UIImage imageNamedFromMyBundle:@"navi_back"] forState:UIControlStateNormal]; |
| 270 | CGRect frame = toolBar.frame; | 269 | CGRect frame = toolBar.frame; |
| 271 | doneButton.frame = CGRectMake(frame.size.width - 60 - 13, frame.size.height /2 - 15 - (kVerticalBottomSafeHeight /2), 60, 30); | 270 | doneButton.frame = CGRectMake(frame.size.width - 60 - 13, frame.size.height /2 - 15 - (kVerticalBottomSafeHeight /2), 60, 30); |
| 272 | 271 |
CNLiveImagePickerController/Classes/TZAssetCell.m
| @@ -169,7 +169,7 @@ | @@ -169,7 +169,7 @@ | ||
| 169 | model.needOscillatoryAnimation = NO; | 169 | model.needOscillatoryAnimation = NO; |
| 170 | 170 | ||
| 171 | if (!model.isExport) { | 171 | if (!model.isExport) { |
| 172 | - self.imageView.image = [UIImage imageNamed:@"placeImg.png"]; | 172 | + self.imageView.image = [UIImage imageNamedFromMyBundle:@"placeImg.png"]; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | 175 | ||
| @@ -441,13 +441,14 @@ | @@ -441,13 +441,14 @@ | ||
| 441 | @interface TZAlbumCell () | 441 | @interface TZAlbumCell () |
| 442 | @property (weak, nonatomic) UIImageView *posterImageView; | 442 | @property (weak, nonatomic) UIImageView *posterImageView; |
| 443 | @property (weak, nonatomic) UILabel *titleLabel; | 443 | @property (weak, nonatomic) UILabel *titleLabel; |
| 444 | +@property (weak, nonatomic) UIImageView *enterImageView; | ||
| 444 | @end | 445 | @end |
| 445 | 446 | ||
| 446 | @implementation TZAlbumCell | 447 | @implementation TZAlbumCell |
| 447 | 448 | ||
| 448 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { | 449 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { |
| 449 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | 450 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; |
| 450 | - self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | 451 | + self.accessoryType = UITableViewCellAccessoryNone; |
| 451 | return self; | 452 | return self; |
| 452 | } | 453 | } |
| 453 | 454 | ||
| @@ -470,7 +471,7 @@ | @@ -470,7 +471,7 @@ | ||
| 470 | } | 471 | } |
| 471 | 472 | ||
| 472 | if (!model.isExport) { | 473 | if (!model.isExport) { |
| 473 | - self.posterImageView.image = [UIImage imageNamed:@"placeImg.png"]; | 474 | + self.posterImageView.image = [UIImage imageNamedFromMyBundle:@"placeImg.png"]; |
| 474 | } | 475 | } |
| 475 | 476 | ||
| 476 | if (self.albumCellDidSetModelBlock) { | 477 | if (self.albumCellDidSetModelBlock) { |
| @@ -482,6 +483,7 @@ | @@ -482,6 +483,7 @@ | ||
| 482 | - (void)layoutSubviews { | 483 | - (void)layoutSubviews { |
| 483 | if (iOS7Later) [super layoutSubviews]; | 484 | if (iOS7Later) [super layoutSubviews]; |
| 484 | _selectedCountButton.frame = CGRectMake(self.tz_width - 24 - 30, 23, 24, 24); | 485 | _selectedCountButton.frame = CGRectMake(self.tz_width - 24 - 30, 23, 24, 24); |
| 486 | + self.enterImageView.frame = CGRectMake(self.tz_width - 20, 30, 6, 12); | ||
| 485 | NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight); | 487 | NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight); |
| 486 | self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight); | 488 | self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight); |
| 487 | self.posterImageView.frame = CGRectMake(0, 0, 70, 70); | 489 | self.posterImageView.frame = CGRectMake(0, 0, 70, 70); |
| @@ -520,6 +522,16 @@ | @@ -520,6 +522,16 @@ | ||
| 520 | return _titleLabel; | 522 | return _titleLabel; |
| 521 | } | 523 | } |
| 522 | 524 | ||
| 525 | +- (UIImageView *)enterImageView { | ||
| 526 | + if (_enterImageView == nil) { | ||
| 527 | + UIImageView *enterImageView = [[UIImageView alloc] init]; | ||
| 528 | + enterImageView.image = [UIImage imageNamedFromMyBundle:@"photo_enter"]; | ||
| 529 | + [self.contentView addSubview:enterImageView]; | ||
| 530 | + _enterImageView = enterImageView; | ||
| 531 | + } | ||
| 532 | + return _enterImageView; | ||
| 533 | +} | ||
| 534 | + | ||
| 523 | - (UIButton *)selectedCountButton { | 535 | - (UIButton *)selectedCountButton { |
| 524 | if (_selectedCountButton == nil) { | 536 | if (_selectedCountButton == nil) { |
| 525 | UIButton *selectedCountButton = [[UIButton alloc] init]; | 537 | UIButton *selectedCountButton = [[UIButton alloc] init]; |
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/mjz_bq@2x.png
0 → 100644
1.23 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/mjz_go@2x.png
0 → 100644
746 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/mjz_q@2x.png
0 → 100644
2.77 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/mjz_sq@2x.png
0 → 100644
1.14 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/mjz_zk@2x.png
0 → 100644
1.15 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/ph_back@2x.png
0 → 100644
384 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_back@2x.png
0 → 100644
1.16 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_cell_normal@2x.png
0 → 100644
1.35 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_enter@2x.png
0 → 100644
268 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_original_nor@2x.png
0 → 100644
2.12 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/ph_unselect@2x.png renamed to CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_original_normal@2x.png
902 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/ph_select@2x.png renamed to CNLiveImagePickerController/Classes/TZImagePickerController.bundle/photo_original_select@2x.png
1.31 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/placeImg@2x.png
0 → 100644
4.48 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/publish_zw@2x.png
0 → 100644
7.66 KB
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/video_edit_left@2x.png
0 → 100644
203 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/video_edit_right@2x.png
0 → 100644
208 Bytes
CNLiveImagePickerController/Classes/TZImagePickerController.bundle/xzq_fh@2x.png
0 → 100644
1.71 KB
CNLiveImagePickerController/Classes/TZImagePickerController.m
| @@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
| 54 | self.navigationBar.barStyle = UIBarStyleBlack; | 54 | self.navigationBar.barStyle = UIBarStyleBlack; |
| 55 | self.navigationBar.translucent = YES; | 55 | self.navigationBar.translucent = YES; |
| 56 | [TZImageManager manager].shouldFixOrientation = NO; | 56 | [TZImageManager manager].shouldFixOrientation = NO; |
| 57 | - | 57 | + |
| 58 | // Default appearance, you can reset these after this method | 58 | // Default appearance, you can reset these after this method |
| 59 | // 默认的外观,你可以在这个方法后重置 | 59 | // 默认的外观,你可以在这个方法后重置 |
| 60 | self.oKButtonTitleColorNormal = [UIColor colorWithRed:(83/255.0) green:(179/255.0) blue:(17/255.0) alpha:1.0]; | 60 | self.oKButtonTitleColorNormal = [UIColor colorWithRed:(83/255.0) green:(179/255.0) blue:(17/255.0) alpha:1.0]; |
| @@ -385,7 +385,7 @@ | @@ -385,7 +385,7 @@ | ||
| 385 | if ([[TZImageManager manager] authorizationStatusAuthorized]) { | 385 | if ([[TZImageManager manager] authorizationStatusAuthorized]) { |
| 386 | [_tipLabel removeFromSuperview]; | 386 | [_tipLabel removeFromSuperview]; |
| 387 | [_settingBtn removeFromSuperview]; | 387 | [_settingBtn removeFromSuperview]; |
| 388 | - | 388 | + |
| 389 | [self pushPhotoPickerVc]; | 389 | [self pushPhotoPickerVc]; |
| 390 | 390 | ||
| 391 | TZAlbumPickerController *albumPickerVc = (TZAlbumPickerController *)self.visibleViewController; | 391 | TZAlbumPickerController *albumPickerVc = (TZAlbumPickerController *)self.visibleViewController; |
| @@ -694,7 +694,7 @@ | @@ -694,7 +694,7 @@ | ||
| 694 | 694 | ||
| 695 | _HUDContainer.frame = CGRectMake((self.view.tz_width - 120) / 2, (self.view.tz_height - 90) / 2, 120, 90); | 695 | _HUDContainer.frame = CGRectMake((self.view.tz_width - 120) / 2, (self.view.tz_height - 90) / 2, 120, 90); |
| 696 | _HUDIndicatorView.frame = CGRectMake(45, 15, 30, 30); | 696 | _HUDIndicatorView.frame = CGRectMake(45, 15, 30, 30); |
| 697 | - _HUDLabel.frame = CGRectMake(0,40, 120, 50); | 697 | + _HUDLabel.frame = CGRectMake(0,40, 120, 50); |
| 698 | } | 698 | } |
| 699 | 699 | ||
| 700 | #pragma mark - Public | 700 | #pragma mark - Public |
| @@ -769,16 +769,17 @@ | @@ -769,16 +769,17 @@ | ||
| 769 | if (![[TZImageManager manager] authorizationStatusAuthorized]) { | 769 | if (![[TZImageManager manager] authorizationStatusAuthorized]) { |
| 770 | return; | 770 | return; |
| 771 | } | 771 | } |
| 772 | - | 772 | + |
| 773 | if (self.isFirstAppear) { | 773 | if (self.isFirstAppear) { |
| 774 | TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController; | 774 | TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController; |
| 775 | [imagePickerVc showProgressHUD]; | 775 | [imagePickerVc showProgressHUD]; |
| 776 | } | 776 | } |
| 777 | __weak typeof(self) weakSelf = self; | 777 | __weak typeof(self) weakSelf = self; |
| 778 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ | 778 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ |
| 779 | - TZImagePickerController *imagePickerVc = (TZImagePickerController *)weakSelf.navigationController; | ||
| 780 | - [[TZImageManager manager] getAllAlbums:imagePickerVc.allowPickingVideo allowPickingImage:imagePickerVc.allowPickingImage needFetchAssets:!weakSelf.isFirstAppear completion:^(NSArray<TZAlbumModel *> *models) { | ||
| 781 | - dispatch_async(dispatch_get_main_queue(), ^{ | 779 | + dispatch_async(dispatch_get_main_queue(), ^{ |
| 780 | + TZImagePickerController *imagePickerVc = (TZImagePickerController *)weakSelf.navigationController; | ||
| 781 | + [[TZImageManager manager] getAllAlbums:imagePickerVc.allowPickingVideo allowPickingImage:imagePickerVc.allowPickingImage needFetchAssets:!weakSelf.isFirstAppear completion:^(NSArray<TZAlbumModel *> *models) { | ||
| 782 | + | ||
| 782 | if (models == nil) { | 783 | if (models == nil) { |
| 783 | [imagePickerVc hideProgressHUD]; | 784 | [imagePickerVc hideProgressHUD]; |
| 784 | return; | 785 | return; |
| @@ -805,8 +806,9 @@ | @@ -805,8 +806,9 @@ | ||
| 805 | } else { | 806 | } else { |
| 806 | [self->_tableView reloadData]; | 807 | [self->_tableView reloadData]; |
| 807 | } | 808 | } |
| 808 | - }); | ||
| 809 | - }]; | 809 | + |
| 810 | + }]; | ||
| 811 | + }); | ||
| 810 | }); | 812 | }); |
| 811 | } | 813 | } |
| 812 | 814 | ||
| @@ -849,7 +851,7 @@ | @@ -849,7 +851,7 @@ | ||
| 849 | cell.albumCellDidSetModelBlock = imagePickerVc.albumCellDidSetModelBlock; | 851 | cell.albumCellDidSetModelBlock = imagePickerVc.albumCellDidSetModelBlock; |
| 850 | cell.selectedCountButton.backgroundColor = imagePickerVc.iconThemeColor; | 852 | cell.selectedCountButton.backgroundColor = imagePickerVc.iconThemeColor; |
| 851 | cell.model = _albumArr[indexPath.row]; | 853 | cell.model = _albumArr[indexPath.row]; |
| 852 | - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | 854 | + cell.accessoryType = UITableViewCellAccessoryNone; |
| 853 | return cell; | 855 | return cell; |
| 854 | } | 856 | } |
| 855 | 857 | ||
| @@ -920,7 +922,7 @@ | @@ -920,7 +922,7 @@ | ||
| 920 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(812, 375)) || | 922 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(812, 375)) || |
| 921 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(414, 896)) || | 923 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(414, 896)) || |
| 922 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(896, 414))); | 924 | CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(896, 414))); |
| 923 | - | 925 | + |
| 924 | } | 926 | } |
| 925 | 927 | ||
| 926 | + (CGFloat)tz_statusBarHeight { | 928 | + (CGFloat)tz_statusBarHeight { |
CNLiveImagePickerController/Classes/placeImg.png deleted
100644 → 0
7.02 KB