Skip to content

Commit

Permalink
调整
Browse files Browse the repository at this point in the history
  • Loading branch information
gsdios committed Aug 12, 2016
1 parent 23aeeed commit ce647ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions SDAutoLayout.podspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Pod::Spec.new do |s|

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

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

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

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

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion SDAutoLayoutDemo/SDAutoLayout/SDAutoLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/*
SDAutoLayout
版本:2.1.5
版本:2.1.7
发布:2016.08.12
*/
Expand Down
2 changes: 1 addition & 1 deletion SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
SDAutoLayout
版本:2.1.5
版本:2.1.7
发布:2016.08.12
*/
Expand Down
5 changes: 4 additions & 1 deletion SDAutoLayoutDemo/SDAutoLayout/UIView+SDAutoLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,10 @@ - (void)layoutAutoWidthWidthView:(UIView *)view model:(SDAutoLayoutModel *)model
label.numberOfLines = 1;
if (label.text.length) {
if (!label.isAttributedContent) {
CGRect rect = [label.text boundingRectWithSize:CGSizeMake(width, label.height_sd) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : label.font} context:nil];
CGRect rect = [label.text boundingRectWithSize:CGSizeMake(MAXFLOAT, label.height_sd) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : label.font} context:nil];
if (rect.size.width > width) {
rect.size.width = width;
}
label.width_sd = rect.size.width + 0.1;
} else{
[label sizeToFit];
Expand Down

0 comments on commit ce647ea

Please sign in to comment.