Skip to content

Commit ea62827

Browse files
committed
correct swift version
1 parent 9ee9f10 commit ea62827

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
4.2

AttributedTextView.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AttributedTextView'
3-
s.version = '1.2.2'
3+
s.version = '1.2.3'
44
s.license = { :type => "MIT", :file => "LICENSE" }
55
s.summary = 'Easiest way to create an attributed UILabel or UITextView (with support for multiple links and HTML)'
66
s.homepage = 'https://github.com/evermeer/AttributedTextView'
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
1010
s.platforms = { :ios => "8.0" }
1111
s.requires_arc = true
1212
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
13-
13+
s.swift_version = '4.2'
1414
s.frameworks = "Foundation", "UIKit"
1515
s.source_files = "Sources/*.swift"
1616
end

AttributedTextView.xcodeproj/project.pbxproj

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
7FDAE1361DEF192A00CB46B6 /* Sample2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample2.png; sourceTree = "<group>"; };
8686
7FDAE1371DEF192A00CB46B6 /* Sample3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample3.png; sourceTree = "<group>"; };
8787
7FDAE1381DEF192A00CB46B6 /* Sample4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample4.png; sourceTree = "<group>"; };
88+
7FF12E28215501FA005769A5 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = "<group>"; };
89+
7FF12E2A215501FA005769A5 /* .swift-version */ = {isa = PBXFileReference; lastKnownFileType = text; path = ".swift-version"; sourceTree = "<group>"; };
90+
7FF12E2B21550219005769A5 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
8891
/* End PBXFileReference section */
8992

9093
/* Begin PBXFrameworksBuildPhase section */
@@ -130,6 +133,9 @@
130133
3549BAFB1DA387DB00C63030 = {
131134
isa = PBXGroup;
132135
children = (
136+
7FF12E2B21550219005769A5 /* .gitignore */,
137+
7FF12E2A215501FA005769A5 /* .swift-version */,
138+
7FF12E28215501FA005769A5 /* .swiftlint.yml */,
133139
3549BB161DA3890B00C63030 /* Sources */,
134140
7F652A761DEE09E900A1E61F /* Demo */,
135141
7FDAE1341DEF192A00CB46B6 /* Screenshots */,
@@ -677,7 +683,7 @@
677683
SKIP_INSTALL = YES;
678684
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
679685
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
680-
SWIFT_VERSION = 4.0;
686+
SWIFT_VERSION = 4.2;
681687
};
682688
name = Debug;
683689
};
@@ -697,7 +703,7 @@
697703
PRODUCT_NAME = AttributedTextView;
698704
SKIP_INSTALL = YES;
699705
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
700-
SWIFT_VERSION = 4.0;
706+
SWIFT_VERSION = 4.2;
701707
};
702708
name = Release;
703709
};
@@ -720,7 +726,7 @@
720726
SKIP_INSTALL = YES;
721727
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
722728
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
723-
SWIFT_VERSION = 4.0;
729+
SWIFT_VERSION = 4.2;
724730
TARGETED_DEVICE_FAMILY = 4;
725731
WATCHOS_DEPLOYMENT_TARGET = 3.0;
726732
};
@@ -744,7 +750,7 @@
744750
SDKROOT = watchos;
745751
SKIP_INSTALL = YES;
746752
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
747-
SWIFT_VERSION = 4.0;
753+
SWIFT_VERSION = 4.2;
748754
TARGETED_DEVICE_FAMILY = 4;
749755
WATCHOS_DEPLOYMENT_TARGET = 3.0;
750756
};
@@ -771,7 +777,7 @@
771777
SKIP_INSTALL = YES;
772778
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
773779
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
774-
SWIFT_VERSION = 4.0;
780+
SWIFT_VERSION = 4.2;
775781
};
776782
name = Debug;
777783
};
@@ -795,7 +801,7 @@
795801
SDKROOT = macosx;
796802
SKIP_INSTALL = YES;
797803
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
798-
SWIFT_VERSION = 4.0;
804+
SWIFT_VERSION = 4.2;
799805
};
800806
name = Release;
801807
};
@@ -817,7 +823,7 @@
817823
SKIP_INSTALL = YES;
818824
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
819825
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
820-
SWIFT_VERSION = 4.0;
826+
SWIFT_VERSION = 4.2;
821827
TARGETED_DEVICE_FAMILY = 3;
822828
TVOS_DEPLOYMENT_TARGET = 10.0;
823829
};
@@ -840,7 +846,7 @@
840846
SDKROOT = appletvos;
841847
SKIP_INSTALL = YES;
842848
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
843-
SWIFT_VERSION = 4.0;
849+
SWIFT_VERSION = 4.2;
844850
TARGETED_DEVICE_FAMILY = 3;
845851
TVOS_DEPLOYMENT_TARGET = 10.0;
846852
};

Sources/AttributedTextView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import UIKit
8484
self.isEditable = false
8585
}
8686
if let color = _attributer?.linkColor {
87-
self.linkTextAttributes = [NSAttributedString.Key.foregroundColor.rawValue: color as Any]
87+
self.linkTextAttributes = [NSAttributedString.Key.foregroundColor: color as Any]
8888
}
8989
}
9090
}

Sources/Attributer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,16 +618,16 @@ open class Attributer {
618618
underline the active range
619619
*/
620620
open var underline: Attributer {
621-
return applyUnderline(NSUnderlineStyle.styleSingle)
621+
return applyUnderline(NSUnderlineStyle.single)
622622
}
623623

624624
/**
625625
set the underline style for the active range (you also have to call .underline)
626626

627627
-parameter underline: The underline style
628628
*/
629-
open func applyUnderline(_ underline: NSUnderlineStyle) -> Attributer {
630-
return applyAttributes(NSAttributedString.Key.underlineStyle.rawValue, value: underline.rawValue as AnyObject)
629+
open func applyUnderline(_ style: NSUnderlineStyle) -> Attributer {
630+
return applyAttributes(NSAttributedString.Key.underlineStyle.rawValue, value: style.rawValue as AnyObject)
631631
}
632632

633633
/**

0 commit comments

Comments
 (0)