diff --git a/Configs/SwiftRichString.plist b/Configs/SwiftRichString.plist index 3596a5d..be864c7 100644 --- a/Configs/SwiftRichString.plist +++ b/Configs/SwiftRichString.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.1 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion diff --git a/ExampleiOS/Base.lproj/Main.storyboard b/ExampleiOS/Base.lproj/Main.storyboard index cc3df7e..9bd57ac 100644 --- a/ExampleiOS/Base.lproj/Main.storyboard +++ b/ExampleiOS/Base.lproj/Main.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -23,8 +21,7 @@ - - + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. diff --git a/Sources/SwiftRichString/Attributes/FontConvertible.swift b/Sources/SwiftRichString/Attributes/FontConvertible.swift index ec52bf9..b496fa2 100644 --- a/Sources/SwiftRichString/Attributes/FontConvertible.swift +++ b/Sources/SwiftRichString/Attributes/FontConvertible.swift @@ -51,7 +51,7 @@ public protocol FontConvertible { // MARK: - FontConvertible for UIFont/NSFont extension Font: FontConvertible { - + /// Return the same instance of the font with specified size. /// /// - Parameter size: size of the font in points. If size is `nil`, `Font.systemFontSize` is used. @@ -59,20 +59,20 @@ extension Font: FontConvertible { public func font(size: CGFloat?) -> Font { #if os(tvOS) return Font(name: self.fontName, size: (size ?? TVOS_SYSTEMFONT_SIZE))! - #elseif os(iOS) - return Font(name: self.fontName, size: (size ?? Font.systemFontSize))! #elseif os(watchOS) return Font(name: self.fontName, size: (size ?? WATCHOS_SYSTEMFONT_SIZE))! #elseif os(macOS) - return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))! + return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))! + #else + return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize)) #endif } - + } // MARK: - FontConvertible for String extension String: FontConvertible { - + /// Transform a string to a valid `UIFont`/`NSFont` instance. /// String must contain a valid Postscript font's name. /// @@ -87,5 +87,5 @@ extension String: FontConvertible { return Font(name: self, size: (size ?? Font.systemFontSize))! #endif } - + } diff --git a/SwiftRichString.podspec b/SwiftRichString.podspec index 08075c0..48cb250 100644 --- a/SwiftRichString.podspec +++ b/SwiftRichString.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SwiftRichString" - s.version = "3.0.2" + s.version = "3.0.3" s.summary = "Elegant Strings & Attributed Strings Toolkit for Swift" s.description = <<-DESC SwiftRichString is the best toolkit to work easily with Strings and Attributed Strings. diff --git a/SwiftRichString.xcodeproj/project.pbxproj b/SwiftRichString.xcodeproj/project.pbxproj index addfaab..e02c05a 100644 --- a/SwiftRichString.xcodeproj/project.pbxproj +++ b/SwiftRichString.xcodeproj/project.pbxproj @@ -1524,6 +1524,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-iOS"; PRODUCT_NAME = SwiftRichString; @@ -1547,6 +1548,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-iOS"; PRODUCT_NAME = SwiftRichString; SKIP_INSTALL = YES; @@ -1596,6 +1598,7 @@ INFOPLIST_FILE = Configs/SwiftRichString.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-watchOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = watchos; @@ -1620,6 +1623,7 @@ INFOPLIST_FILE = Configs/SwiftRichString.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-watchOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = watchos; @@ -1644,6 +1648,7 @@ INFOPLIST_FILE = Configs/SwiftRichString.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-tvOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = appletvos; @@ -1667,6 +1672,7 @@ INFOPLIST_FILE = Configs/SwiftRichString.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-tvOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = appletvos; @@ -1693,6 +1699,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = macosx; @@ -1718,6 +1725,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = macosx;