Skip to content

Commit

Permalink
优化一些样式细节;发布1.8.8版本
Browse files Browse the repository at this point in the history
  • Loading branch information
banchichen committed Aug 7, 2017
1 parent 9c84981 commit 132a578
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ A:1.8.4版本已支持
A:考虑下,优先级低

最近更新
1.8.8 修复一些细节
1.8.5 修复一些样式细节
1.8.4 加入横竖屏适配;支持视频/gif多选;支持视频和照片一起选
1.8.1 新增2个代理方法,支持由上层来决定相册/照片的显示与否
Expand Down
4 changes: 2 additions & 2 deletions TZImagePickerController.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Pod::Spec.new do |s|
s.name = "TZImagePickerController"
s.version = "1.8.7"
s.version = "1.8.8"
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
s.homepage = "https://github.com/banchichen/TZImagePickerController"
s.license = "MIT"
s.author = { "banchichen" => "tanzhenios@foxmail.com" }
s.platform = :ios
s.ios.deployment_target = "6.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "1.8.7" }
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "1.8.8" }
s.requires_arc = true
s.resources = "TZImagePickerController/TZImagePickerController/*.{png,xib,nib,bundle}"
s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}"
Expand Down
2 changes: 1 addition & 1 deletion TZImagePickerController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.6</string>
<string>1.8.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
24 changes: 9 additions & 15 deletions TZImagePickerController/TZImagePickerController/TZAssetCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,16 @@ - (void)layoutSubviews {
@interface TZAlbumCell ()
@property (weak, nonatomic) UIImageView *posterImageView;
@property (weak, nonatomic) UILabel *titleLabel;
@property (weak, nonatomic) UIImageView *arrowImageView;
@end

@implementation TZAlbumCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return self;
}

- (void)setModel:(TZAlbumModel *)model {
_model = model;

Expand All @@ -278,6 +283,9 @@ - (void)setModel:(TZAlbumModel *)model {
- (void)layoutSubviews {
if (iOS7Later) [super layoutSubviews];
_selectedCountButton.frame = CGRectMake(self.tz_width - 24 - 30, 23, 24, 24);
NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight);
self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight);
self.posterImageView.frame = CGRectMake(0, 0, 70, 70);
}

- (void)layoutSublayersOfLayer:(CALayer *)layer {
Expand All @@ -291,7 +299,6 @@ - (UIImageView *)posterImageView {
UIImageView *posterImageView = [[UIImageView alloc] init];
posterImageView.contentMode = UIViewContentModeScaleAspectFill;
posterImageView.clipsToBounds = YES;
posterImageView.frame = CGRectMake(0, 0, 70, 70);
[self.contentView addSubview:posterImageView];
_posterImageView = posterImageView;
}
Expand All @@ -302,7 +309,6 @@ - (UILabel *)titleLabel {
if (_titleLabel == nil) {
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:17];
titleLabel.frame = CGRectMake(80, 0, self.tz_width - 80 - 50, self.tz_height);
titleLabel.textColor = [UIColor blackColor];
titleLabel.textAlignment = NSTextAlignmentLeft;
[self.contentView addSubview:titleLabel];
Expand All @@ -311,18 +317,6 @@ - (UILabel *)titleLabel {
return _titleLabel;
}

- (UIImageView *)arrowImageView {
if (_arrowImageView == nil) {
UIImageView *arrowImageView = [[UIImageView alloc] init];
CGFloat arrowWH = 15;
arrowImageView.frame = CGRectMake(self.tz_width - arrowWH - 12, 28, arrowWH, arrowWH);
[arrowImageView setImage:[UIImage imageNamedFromMyBundle:@"TableViewArrow"]];
[self.contentView addSubview:arrowImageView];
_arrowImageView = arrowImageView;
}
return _arrowImageView;
}

- (UIButton *)selectedCountButton {
if (_selectedCountButton == nil) {
UIButton *selectedCountButton = [[UIButton alloc] init];
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved.
// version 1.8.7 - 2017.07.28
// version 1.8.8 - 2017.08.07
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved.
// version 1.8.7 - 2017.07.28
// version 1.8.8 - 2017.08.07
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController

#import "TZImagePickerController.h"
Expand Down

0 comments on commit 132a578

Please sign in to comment.