Skip to content

Commit ce647ea

Browse files
committed
调整
1 parent 23aeeed commit ce647ea

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

SDAutoLayout.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SDAutoLayout"
4-
s.version = "2.1.5"
5-
s.summary = "The most easy way for autoLayout. 2.1.5版本更新内容:实现在tableview插入新的cell数据时自动缓存管理"
4+
s.version = "2.1.6"
5+
s.summary = "The most easy way for autoLayout. 2.1.6版本更新内容:实现在tableview插入新的cell数据时自动缓存管理"
66

77
s.homepage = "https://github.com/gsdios/SDAutoLayout"
88
# s.screenshots = "https://camo.githubusercontent.com/5d9e879c7006297b3d6e12c20c6cd1e15bf83016/687474703a2f2f7777332e73696e61696d672e636e2f626d6964646c652f39623831343665646777316578346d756b69787236673230396730376c6864742e676966"
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
1414
s.platform = :ios
1515
s.platform = :ios, "7.0"
1616

17-
s.source = { :git => "https://github.com/gsdios/SDAutoLayout.git", :tag => "2.1.5"}
17+
s.source = { :git => "https://github.com/gsdios/SDAutoLayout.git", :tag => "2.1.6"}
1818

1919
s.source_files = "SDAutoLayoutDemo/SDAutoLayout/**/*.{h,m}"
2020

SDAutoLayoutDemo/SDAutoLayout/SDAutoLayout.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/*
1111
1212
SDAutoLayout
13-
版本:2.1.5
13+
版本:2.1.7
1414
发布:2016.08.12
1515
1616
*/

SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
4848
4949
SDAutoLayout
50-
版本:2.1.5
50+
版本:2.1.7
5151
发布:2016.08.12
5252
5353
*/

SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,10 @@ - (void)layoutAutoWidthWidthView:(UIView *)view model:(SDAutoLayoutModel *)model
13011301
label.numberOfLines = 1;
13021302
if (label.text.length) {
13031303
if (!label.isAttributedContent) {
1304-
CGRect rect = [label.text boundingRectWithSize:CGSizeMake(width, label.height_sd) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : label.font} context:nil];
1304+
CGRect rect = [label.text boundingRectWithSize:CGSizeMake(MAXFLOAT, label.height_sd) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : label.font} context:nil];
1305+
if (rect.size.width > width) {
1306+
rect.size.width = width;
1307+
}
13051308
label.width_sd = rect.size.width + 0.1;
13061309
} else{
13071310
[label sizeToFit];

0 commit comments

Comments
 (0)