Skip to content

Commit 508084d

Browse files
committed
重构UILabel的文本特殊处理 完美兼容adjustsFontSizeToFitWidth特性
1 parent 62fcc3f commit 508084d

File tree

8 files changed

+87
-143
lines changed

8 files changed

+87
-143
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.1"
4+
s.version = "1.6.2"
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
@@ -824,7 +824,7 @@
824824
"@executable_path/Frameworks",
825825
"@loader_path/Frameworks",
826826
);
827-
MARKETING_VERSION = 1.6.0;
827+
MARKETING_VERSION = 1.6.2;
828828
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.watchos;
829829
PRODUCT_NAME = AttributedString;
830830
SDKROOT = watchos;
@@ -852,7 +852,7 @@
852852
"@executable_path/Frameworks",
853853
"@loader_path/Frameworks",
854854
);
855-
MARKETING_VERSION = 1.6.0;
855+
MARKETING_VERSION = 1.6.2;
856856
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.watchos;
857857
PRODUCT_NAME = AttributedString;
858858
SDKROOT = watchos;
@@ -879,7 +879,7 @@
879879
"@executable_path/Frameworks",
880880
"@loader_path/Frameworks",
881881
);
882-
MARKETING_VERSION = 1.6.0;
882+
MARKETING_VERSION = 1.6.2;
883883
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.tvos;
884884
PRODUCT_NAME = AttributedString;
885885
SDKROOT = appletvos;
@@ -906,7 +906,7 @@
906906
"@executable_path/Frameworks",
907907
"@loader_path/Frameworks",
908908
);
909-
MARKETING_VERSION = 1.6.0;
909+
MARKETING_VERSION = 1.6.2;
910910
PRODUCT_BUNDLE_IDENTIFIER = com.attributedstring.tvos;
911911
PRODUCT_NAME = AttributedString;
912912
SDKROOT = appletvos;
@@ -982,7 +982,7 @@
982982
"@loader_path/Frameworks",
983983
);
984984
MACOSX_DEPLOYMENT_TARGET = 10.13;
985-
MARKETING_VERSION = 1.6.0;
985+
MARKETING_VERSION = 1.6.2;
986986
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
987987
PRODUCT_NAME = AttributedString;
988988
SDKROOT = macosx;
@@ -1009,7 +1009,7 @@
10091009
"@loader_path/Frameworks",
10101010
);
10111011
MACOSX_DEPLOYMENT_TARGET = 10.13;
1012-
MARKETING_VERSION = 1.6.0;
1012+
MARKETING_VERSION = 1.6.2;
10131013
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
10141014
PRODUCT_NAME = AttributedString;
10151015
SDKROOT = macosx;
@@ -1156,7 +1156,7 @@
11561156
"@executable_path/Frameworks",
11571157
"@loader_path/Frameworks",
11581158
);
1159-
MARKETING_VERSION = 1.6.0;
1159+
MARKETING_VERSION = 1.6.2;
11601160
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.ios;
11611161
PRODUCT_NAME = AttributedString;
11621162
SKIP_INSTALL = YES;
@@ -1184,7 +1184,7 @@
11841184
"@executable_path/Frameworks",
11851185
"@loader_path/Frameworks",
11861186
);
1187-
MARKETING_VERSION = 1.6.0;
1187+
MARKETING_VERSION = 1.6.2;
11881188
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.ios;
11891189
PRODUCT_NAME = AttributedString;
11901190
SKIP_INSTALL = YES;

Demo/Demo.xcodeproj/project.pbxproj

-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
9B1C4964238405A7002CDC4B /* ParagraphStyleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B1C4963238405A7002CDC4B /* ParagraphStyleViewController.swift */; };
1111
9B1C49662384065D002CDC4B /* AttachmentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B1C49652384065D002CDC4B /* AttachmentViewController.swift */; };
1212
9B6E898A23823F47009EBEBE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E898923823F47009EBEBE /* AppDelegate.swift */; };
13-
9B6E898C23823F47009EBEBE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E898B23823F47009EBEBE /* SceneDelegate.swift */; };
1413
9B6E898E23823F47009EBEBE /* SimpleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E898D23823F47009EBEBE /* SimpleViewController.swift */; };
1514
9B6E899123823F47009EBEBE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9B6E898F23823F47009EBEBE /* Main.storyboard */; };
1615
9B6E899323823F48009EBEBE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9B6E899223823F48009EBEBE /* Assets.xcassets */; };
@@ -59,7 +58,6 @@
5958
9B1C49652384065D002CDC4B /* AttachmentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttachmentViewController.swift; sourceTree = "<group>"; };
6059
9B6E898623823F47009EBEBE /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
6160
9B6E898923823F47009EBEBE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
62-
9B6E898B23823F47009EBEBE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
6361
9B6E898D23823F47009EBEBE /* SimpleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleViewController.swift; sourceTree = "<group>"; };
6462
9B6E899023823F47009EBEBE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
6563
9B6E899223823F48009EBEBE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -124,7 +122,6 @@
124122
9BD90EFC2383FA57000DBD29 /* Details */,
125123
9B6E89D023827CE2009EBEBE /* Cell */,
126124
9B6E898923823F47009EBEBE /* AppDelegate.swift */,
127-
9B6E898B23823F47009EBEBE /* SceneDelegate.swift */,
128125
9B6E898D23823F47009EBEBE /* SimpleViewController.swift */,
129126
9B6E898F23823F47009EBEBE /* Main.storyboard */,
130127
9B6E899223823F48009EBEBE /* Assets.xcassets */,
@@ -275,7 +272,6 @@
275272
9BD90F1823840563000DBD29 /* ExpansionViewController.swift in Sources */,
276273
9BD90F0C2384051C000DBD29 /* UnderlineViewController.swift in Sources */,
277274
9BD90EFE23840402000DBD29 /* FontViewController.swift in Sources */,
278-
9B6E898C23823F47009EBEBE /* SceneDelegate.swift in Sources */,
279275
9BE7D4BF2487B93500DE1176 /* ActionViewController.swift in Sources */,
280276
);
281277
runOnlyForDeploymentPostprocessing = 0;

Demo/Demo/AppDelegate.swift

+1-19
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,11 @@ import UIKit
1111
@UIApplicationMain
1212
class AppDelegate: UIResponder, UIApplicationDelegate {
1313

14-
14+
var window: UIWindow?
1515

1616
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1717
// Override point for customization after application launch.
1818
return true
1919
}
20-
21-
// MARK: UISceneSession Lifecycle
22-
23-
@available(iOS 13.0, *)
24-
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
25-
// Called when a new scene session is being created.
26-
// Use this method to select a configuration to create the new scene with.
27-
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
28-
}
29-
30-
@available(iOS 13.0, *)
31-
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
32-
// Called when the user discards a scene session.
33-
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
34-
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
35-
}
36-
37-
3820
}
3921

Demo/Demo/Base.lproj/Main.storyboard

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="yd7-Jm-fFU">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="yd7-Jm-fFU">
33
<device id="retina5_9" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>

Demo/Demo/Info.plist

-19
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,6 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23-
<key>UIApplicationSceneManifest</key>
24-
<dict>
25-
<key>UIApplicationSupportsMultipleScenes</key>
26-
<false/>
27-
<key>UISceneConfigurations</key>
28-
<dict>
29-
<key>UIWindowSceneSessionRoleApplication</key>
30-
<array>
31-
<dict>
32-
<key>UISceneConfigurationName</key>
33-
<string>Default Configuration</string>
34-
<key>UISceneDelegateClassName</key>
35-
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
36-
<key>UISceneStoryboardFile</key>
37-
<string>Main</string>
38-
</dict>
39-
</array>
40-
</dict>
41-
</dict>
4223
<key>UILaunchStoryboardName</key>
4324
<string>LaunchScreen</string>
4425
<key>UIMainStoryboardFile</key>

Demo/Demo/SceneDelegate.swift

-54
This file was deleted.

0 commit comments

Comments
 (0)