Skip to content

Commit f2d860c

Browse files
committed
优化段落样式API
1 parent 42df752 commit f2d860c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

AttributedString.podspec

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

33
s.name = "AttributedString"
4-
s.version = "1.6.5"
4+
s.version = "1.6.6"
55
s.summary = "基于Swift字符串插值快速构建你想要的富文本, 支持点击按住等事件获取, 支持多种类型过滤"
66

77
s.homepage = "https://github.com/lixiang1994/AttributedString"

AttributedString.xcodeproj/project.pbxproj

+8-8
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@
838838
"@executable_path/Frameworks",
839839
"@loader_path/Frameworks",
840840
);
841-
MARKETING_VERSION = 1.6.5;
841+
MARKETING_VERSION = 1.6.6;
842842
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.watchos;
843843
PRODUCT_NAME = AttributedString;
844844
SDKROOT = watchos;
@@ -866,7 +866,7 @@
866866
"@executable_path/Frameworks",
867867
"@loader_path/Frameworks",
868868
);
869-
MARKETING_VERSION = 1.6.5;
869+
MARKETING_VERSION = 1.6.6;
870870
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.watchos;
871871
PRODUCT_NAME = AttributedString;
872872
SDKROOT = watchos;
@@ -893,7 +893,7 @@
893893
"@executable_path/Frameworks",
894894
"@loader_path/Frameworks",
895895
);
896-
MARKETING_VERSION = 1.6.5;
896+
MARKETING_VERSION = 1.6.6;
897897
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.tvos;
898898
PRODUCT_NAME = AttributedString;
899899
SDKROOT = appletvos;
@@ -920,7 +920,7 @@
920920
"@executable_path/Frameworks",
921921
"@loader_path/Frameworks",
922922
);
923-
MARKETING_VERSION = 1.6.5;
923+
MARKETING_VERSION = 1.6.6;
924924
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.tvos;
925925
PRODUCT_NAME = AttributedString;
926926
SDKROOT = appletvos;
@@ -996,7 +996,7 @@
996996
"@loader_path/Frameworks",
997997
);
998998
MACOSX_DEPLOYMENT_TARGET = 10.13;
999-
MARKETING_VERSION = 1.6.5;
999+
MARKETING_VERSION = 1.6.6;
10001000
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
10011001
PRODUCT_NAME = AttributedString;
10021002
SDKROOT = macosx;
@@ -1023,7 +1023,7 @@
10231023
"@loader_path/Frameworks",
10241024
);
10251025
MACOSX_DEPLOYMENT_TARGET = 10.13;
1026-
MARKETING_VERSION = 1.6.5;
1026+
MARKETING_VERSION = 1.6.6;
10271027
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
10281028
PRODUCT_NAME = AttributedString;
10291029
SDKROOT = macosx;
@@ -1170,7 +1170,7 @@
11701170
"@executable_path/Frameworks",
11711171
"@loader_path/Frameworks",
11721172
);
1173-
MARKETING_VERSION = 1.6.5;
1173+
MARKETING_VERSION = 1.6.6;
11741174
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.ios;
11751175
PRODUCT_NAME = AttributedString;
11761176
SKIP_INSTALL = YES;
@@ -1199,7 +1199,7 @@
11991199
"@executable_path/Frameworks",
12001200
"@loader_path/Frameworks",
12011201
);
1202-
MARKETING_VERSION = 1.6.5;
1202+
MARKETING_VERSION = 1.6.6;
12031203
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.ios;
12041204
PRODUCT_NAME = AttributedString;
12051205
SKIP_INSTALL = YES;

Demo/Demo/Debug/DebugLabelViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class DebugLabelViewController: ViewController<DebugLabelView> {
112112
private func updateText() {
113113
container.set(text: .init(
114114
attributedString,
115-
with: attributes + [.paragraph(paragraphs)]
115+
with: attributes + [.paragraph(with: paragraphs)]
116116
))
117117
}
118118

Sources/ParagraphStyle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension AttributedString.Attribute {
2929
/// 段落
3030
/// - Parameter value: 段落样式
3131
/// - Returns: 属性
32-
public static func paragraph(_ value: [ParagraphStyle]) -> Self {
32+
public static func paragraph(with value: [ParagraphStyle]) -> Self {
3333
return .init(attributes: value.isEmpty ? [:] : [.paragraphStyle: ParagraphStyle.get(value)])
3434
}
3535
}

0 commit comments

Comments
 (0)