Skip to content

Commit

Permalink
correct swift version
Browse files Browse the repository at this point in the history
  • Loading branch information
evermeer committed Sep 21, 2018
1 parent 9ee9f10 commit ea62827
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2
4 changes: 2 additions & 2 deletions AttributedTextView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AttributedTextView'
s.version = '1.2.2'
s.version = '1.2.3'
s.license = { :type => "MIT", :file => "LICENSE" }
s.summary = 'Easiest way to create an attributed UILabel or UITextView (with support for multiple links and HTML)'
s.homepage = 'https://github.com/evermeer/AttributedTextView'
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => "8.0" }
s.requires_arc = true
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }

s.swift_version = '4.2'
s.frameworks = "Foundation", "UIKit"
s.source_files = "Sources/*.swift"
end
22 changes: 14 additions & 8 deletions AttributedTextView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
7FDAE1361DEF192A00CB46B6 /* Sample2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample2.png; sourceTree = "<group>"; };
7FDAE1371DEF192A00CB46B6 /* Sample3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample3.png; sourceTree = "<group>"; };
7FDAE1381DEF192A00CB46B6 /* Sample4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sample4.png; sourceTree = "<group>"; };
7FF12E28215501FA005769A5 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = "<group>"; };
7FF12E2A215501FA005769A5 /* .swift-version */ = {isa = PBXFileReference; lastKnownFileType = text; path = ".swift-version"; sourceTree = "<group>"; };
7FF12E2B21550219005769A5 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -130,6 +133,9 @@
3549BAFB1DA387DB00C63030 = {
isa = PBXGroup;
children = (
7FF12E2B21550219005769A5 /* .gitignore */,
7FF12E2A215501FA005769A5 /* .swift-version */,
7FF12E28215501FA005769A5 /* .swiftlint.yml */,
3549BB161DA3890B00C63030 /* Sources */,
7F652A761DEE09E900A1E61F /* Demo */,
7FDAE1341DEF192A00CB46B6 /* Screenshots */,
Expand Down Expand Up @@ -677,7 +683,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -697,7 +703,7 @@
PRODUCT_NAME = AttributedTextView;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -720,7 +726,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
};
Expand All @@ -744,7 +750,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
};
Expand All @@ -771,7 +777,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -795,7 +801,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -817,7 +823,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
Expand All @@ -840,7 +846,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
Expand Down
2 changes: 1 addition & 1 deletion Sources/AttributedTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import UIKit
self.isEditable = false
}
if let color = _attributer?.linkColor {
self.linkTextAttributes = [NSAttributedString.Key.foregroundColor.rawValue: color as Any]
self.linkTextAttributes = [NSAttributedString.Key.foregroundColor: color as Any]
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Attributer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,16 @@ open class Attributer {
underline the active range
*/
open var underline: Attributer {
return applyUnderline(NSUnderlineStyle.styleSingle)
return applyUnderline(NSUnderlineStyle.single)
}

/**
set the underline style for the active range (you also have to call .underline)
-parameter underline: The underline style
*/
open func applyUnderline(_ underline: NSUnderlineStyle) -> Attributer {
return applyAttributes(NSAttributedString.Key.underlineStyle.rawValue, value: underline.rawValue as AnyObject)
open func applyUnderline(_ style: NSUnderlineStyle) -> Attributer {
return applyAttributes(NSAttributedString.Key.underlineStyle.rawValue, value: style.rawValue as AnyObject)
}

/**
Expand Down

0 comments on commit ea62827

Please sign in to comment.