Skip to content

Commit cc6b287

Browse files
committed
Update for Swift 4.2
1 parent 5adc142 commit cc6b287

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

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.1.0'
3+
s.version = '1.2.0'
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'
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.source = { :git => "https://github.com/evermeer/AttributedTextView.git", :tag => "v"+s.version.to_s }
1010
s.platforms = { :ios => "8.0" }
1111
s.requires_arc = true
12-
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
12+
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
1313

1414
s.frameworks = "Foundation", "UIKit"
1515
s.source_files = "Sources/*.swift"

Demo/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
1515

16-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1717
return true
1818
}
1919
}

Demo/ViewController.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ViewController: UIViewController {
6262
}
6363
}.underline
6464
.append(" for testing links. Or tap on the 'next sample' link below ").black
65-
.underline(.styleDouble, .patternDashDotDot)
65+
.applyUnderline(.double, .patternDashDotDot)
6666
.append("[test]").makeInteract { text in
6767
print("makeInteract : \(text)")
6868
}
@@ -87,10 +87,12 @@ class ViewController: UIViewController {
8787
func showSample3() {
8888
attributedTextView.attributer = decorate(2) { content in return content
8989
+ "It is this or it is that where the word is is selected\n\n".size(20)
90-
.match("is").underline.underline(UIColor.red)
90+
.match("is").underline
91+
.applyUnderline(UIColor.red)
9192
.matchAll("is").strikethrough(4)
9293
+ "Select any of the qords quick, brown and lazy in: The quick brown fox jumps over the lazy dog".size(16)
93-
.matchAny(["quick", "brown", "lazy"]).underline.underline(UIColor.red)
94+
.matchAny(["quick", "brown", "lazy"]).underline
95+
.applyUnderline(UIColor.red)
9496
}
9597
}
9698

Readme.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## AttributedTextView
22

3-
⚠️ For Swift 4.2 / XCode 10 see the XCode10 branch ⚠️
4-
53
[![Issues](https://img.shields.io/github/issues-raw/evermeer/AttributedTextView.svg?style=flat)](https://github.com/evermeer/AttributedTextView/issues)
64
[![Documentation](https://img.shields.io/badge/documented-99%-green.svg?style=flat)](http://cocoadocs.org/docsets/AttributedTextView)
75
[![Stars](https://img.shields.io/github/stars/evermeer/AttributedTextView.svg?style=flat)](https://github.com/evermeer/AttributedTextView/stargazers)

0 commit comments

Comments
 (0)