Skip to content

Commit 362c34c

Browse files
committed
FIX: 修复 appendSpacing 高度为 1 导致的黑边问题
1 parent b83c28d commit 362c34c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

SCRAttributedStringBuilder.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "SCRAttributedStringBuilder"
4-
s.version = "1.1.1"
4+
s.version = "1.1.2"
55
s.summary = "Build NSAttributedString in chain"
66
s.description = <<-DESC
77
SCRAttributedStringBuilder is a NSMutableAttributedString category which can build attributed string in chain, just like 'make' in Masonry, for simplying original redundant way.

Sources/Objective-C/NSMutableAttributedString+SCRAttributedStringBuilder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ - (void)setScr_ranges:(NSArray *)scr_ranges {
7575

7676
NSTextAttachment *attachment = [NSTextAttachment new];
7777
attachment.image = nil;
78-
attachment.bounds = CGRectMake(0, 0, spacing, 1);
78+
attachment.bounds = CGRectMake(0, 0, spacing, 0);
7979
return self.appendAttachment(attachment);
8080
};
8181
}

Sources/Swift/AttributdStringBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class AttributedStringBuilder {
4949
}
5050
let attachment = NSTextAttachment()
5151
attachment.image = nil
52-
attachment.bounds = CGRect(x: 0, y: 0, width: Int(spacing), height: 1)
52+
attachment.bounds = CGRect(x: 0, y: 0, width: Int(spacing), height: 0)
5353
return appendAttachment(attachment)
5454
}
5555

0 commit comments

Comments
 (0)