Skip to content

Commit 434b753

Browse files
committed
Merge branch 'release/3.0.3'
2 parents 56508ee + 6cbc88a commit 434b753

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

Configs/SwiftRichString.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.0.1</string>
18+
<string>$(MARKETING_VERSION)</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

ExampleiOS/Base.lproj/Main.storyboard

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.13.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3-
<device id="retina4_7" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.9"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
97
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
108
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
119
</dependencies>
@@ -23,8 +21,7 @@
2321
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2422
<subviews>
2523
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="M2v-v6-dEE">
26-
<rect key="frame" x="10" y="30" width="355" height="627"/>
27-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
24+
<rect key="frame" x="10" y="10" width="355" height="647"/>
2825
<string key="text">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.</string>
2926
<fontDescription key="fontDescription" type="system" pointSize="14"/>
3027
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>

Sources/SwiftRichString/Attributes/FontConvertible.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,28 @@ public protocol FontConvertible {
5151

5252
// MARK: - FontConvertible for UIFont/NSFont
5353
extension Font: FontConvertible {
54-
54+
5555
/// Return the same instance of the font with specified size.
5656
///
5757
/// - Parameter size: size of the font in points. If size is `nil`, `Font.systemFontSize` is used.
5858
/// - Returns: instance of the font.
5959
public func font(size: CGFloat?) -> Font {
6060
#if os(tvOS)
6161
return Font(name: self.fontName, size: (size ?? TVOS_SYSTEMFONT_SIZE))!
62-
#elseif os(iOS)
63-
return Font(name: self.fontName, size: (size ?? Font.systemFontSize))!
6462
#elseif os(watchOS)
6563
return Font(name: self.fontName, size: (size ?? WATCHOS_SYSTEMFONT_SIZE))!
6664
#elseif os(macOS)
67-
return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))!
65+
return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))!
66+
#else
67+
return Font(descriptor: self.fontDescriptor, size: (size ?? Font.systemFontSize))
6868
#endif
6969
}
70-
70+
7171
}
7272

7373
// MARK: - FontConvertible for String
7474
extension String: FontConvertible {
75-
75+
7676
/// Transform a string to a valid `UIFont`/`NSFont` instance.
7777
/// String must contain a valid Postscript font's name.
7878
///
@@ -87,5 +87,5 @@ extension String: FontConvertible {
8787
return Font(name: self, size: (size ?? Font.systemFontSize))!
8888
#endif
8989
}
90-
90+
9191
}

SwiftRichString.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SwiftRichString"
3-
s.version = "3.0.2"
3+
s.version = "3.0.3"
44
s.summary = "Elegant Strings & Attributed Strings Toolkit for Swift"
55
s.description = <<-DESC
66
SwiftRichString is the best toolkit to work easily with Strings and Attributed Strings.

SwiftRichString.xcodeproj/project.pbxproj

+8
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,7 @@
15241524
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
15251525
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
15261526
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1527+
MARKETING_VERSION = 3.0.3;
15271528
ONLY_ACTIVE_ARCH = NO;
15281529
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-iOS";
15291530
PRODUCT_NAME = SwiftRichString;
@@ -1547,6 +1548,7 @@
15471548
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
15481549
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
15491550
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1551+
MARKETING_VERSION = 3.0.3;
15501552
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-iOS";
15511553
PRODUCT_NAME = SwiftRichString;
15521554
SKIP_INSTALL = YES;
@@ -1596,6 +1598,7 @@
15961598
INFOPLIST_FILE = Configs/SwiftRichString.plist;
15971599
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
15981600
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1601+
MARKETING_VERSION = 3.0.3;
15991602
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-watchOS";
16001603
PRODUCT_NAME = SwiftRichString;
16011604
SDKROOT = watchos;
@@ -1620,6 +1623,7 @@
16201623
INFOPLIST_FILE = Configs/SwiftRichString.plist;
16211624
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
16221625
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1626+
MARKETING_VERSION = 3.0.3;
16231627
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-watchOS";
16241628
PRODUCT_NAME = SwiftRichString;
16251629
SDKROOT = watchos;
@@ -1644,6 +1648,7 @@
16441648
INFOPLIST_FILE = Configs/SwiftRichString.plist;
16451649
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
16461650
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1651+
MARKETING_VERSION = 3.0.3;
16471652
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-tvOS";
16481653
PRODUCT_NAME = SwiftRichString;
16491654
SDKROOT = appletvos;
@@ -1667,6 +1672,7 @@
16671672
INFOPLIST_FILE = Configs/SwiftRichString.plist;
16681673
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
16691674
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1675+
MARKETING_VERSION = 3.0.3;
16701676
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-tvOS";
16711677
PRODUCT_NAME = SwiftRichString;
16721678
SDKROOT = appletvos;
@@ -1693,6 +1699,7 @@
16931699
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
16941700
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
16951701
MACOSX_DEPLOYMENT_TARGET = 10.10;
1702+
MARKETING_VERSION = 3.0.3;
16961703
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS";
16971704
PRODUCT_NAME = SwiftRichString;
16981705
SDKROOT = macosx;
@@ -1718,6 +1725,7 @@
17181725
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
17191726
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
17201727
MACOSX_DEPLOYMENT_TARGET = 10.10;
1728+
MARKETING_VERSION = 3.0.3;
17211729
PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS";
17221730
PRODUCT_NAME = SwiftRichString;
17231731
SDKROOT = macosx;

0 commit comments

Comments
 (0)