Skip to content

Commit 114879d

Browse files
committed
Support Swift 4.2
1 parent 51107b5 commit 114879d

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
matrix:
22
include:
3+
- os: osx
4+
language: objective-c
5+
osx_image: xcode10
6+
xcode_sdk: 12.0
7+
env: SWFT=4.2
8+
- os: osx
9+
language: objective-c
10+
osx_image: xcode10
11+
xcode_sdk: 12.0
12+
env: SWFT=4.1
313
- os: osx
414
language: objective-c
515
osx_image: xcode9

DDSpiderChart.podspec

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
#
2-
# Be sure to run `pod lib lint DDSpiderChart.podspec' to ensure this is a
3-
# valid spec before submitting.
4-
#
5-
# Any lines starting with a # are optional, but their use is encouraged
6-
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
7-
#
8-
91
Pod::Spec.new do |s|
102
s.name = 'DDSpiderChart'
11-
s.version = '0.3'
3+
s.version = '0.4'
124
s.summary = 'Easy to use Spider (Radar) Chart library for iOS written in Swift.'
135

146
s.homepage = 'https://github.com/dadalar/DDSpiderChart'
15-
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
7+
s.screenshots = 'https://raw.githubusercontent.com/dadalar/DDSpiderChart/master/Screenshots/sample1.png', 'https://raw.githubusercontent.com/dadalar/DDSpiderChart/master/Screenshots/sample2.png'
168
s.license = { :type => 'MIT', :file => 'LICENSE' }
179
s.author = { 'Deniz Adalar' => 'me@dadalar.net' }
1810
s.source = { :git => 'https://github.com/dadalar/DDSpiderChart.git', :tag => s.version.to_s }

DDSpiderChart/Classes/DrawableString.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ extension NSString: DrawableString {
2222
style.lineBreakMode = .byClipping
2323
style.alignment = .center
2424

25-
#if swift(>=4.0)
26-
draw(with: rect, options: .usesLineFragmentOrigin, attributes: [NSAttributedStringKey.paragraphStyle: style], context: nil)
25+
#if swift(>=4.2)
26+
draw(with: rect, options: .usesLineFragmentOrigin, attributes: [NSAttributedString.Key.paragraphStyle: style], context: nil)
27+
#elseif swift(>=4.0)
28+
draw(with: rect, options: .usesLineFragmentOrigin, attributes: [NSAttributedStringKey.paragraphStyle: style], context: nil)
2729
#else
2830
draw(with: rect, options: .usesLineFragmentOrigin, attributes: [NSParagraphStyleAttributeName: style], context: nil)
2931
#endif

0 commit comments

Comments
 (0)