Skip to content

Commit 98a472c

Browse files
committed
migrate to swift 4.2
1 parent c43b6b6 commit 98a472c

File tree

17 files changed

+35
-35
lines changed

17 files changed

+35
-35
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

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
language: objective-c
2-
osx_image: xcode9.3beta
2+
osx_image: xcode10
33
matrix:
44
include:
5-
- osx_image: xcode9.3beta
5+
- osx_image: xcode10
66
env: PLATFORM="iOS"
7-
- osx_image: xcode9.3beta
7+
- osx_image: xcode10
88
env: PLATFORM="tvOS"
9-
- osx_image: xcode9.3beta
9+
- osx_image: xcode10
1010
env: PLATFORM="macOS"
1111
env:
1212
global:

Charts.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Charts"
3-
s.version = "3.1.1"
3+
s.version = "3.2.0"
44
s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)"
55
s.homepage = "https://github.com/danielgindi/Charts"
66
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }

ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@
658658
TargetAttributes = {
659659
225B361C1F6EB9A50005B3D5 = {
660660
CreatedOnToolsVersion = 9.0;
661+
LastSwiftMigration = 1000;
661662
};
662663
5B57BBAE1A9B26AA0036A6CC = {
663664
CreatedOnToolsVersion = 6.1.1;
@@ -906,7 +907,7 @@
906907
PRODUCT_NAME = "$(TARGET_NAME)";
907908
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
908909
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
909-
SWIFT_VERSION = 4.0;
910+
SWIFT_VERSION = 4.2;
910911
TARGETED_DEVICE_FAMILY = 1;
911912
};
912913
name = Debug;
@@ -935,7 +936,7 @@
935936
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
936937
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-Swift";
937938
PRODUCT_NAME = "$(TARGET_NAME)";
938-
SWIFT_VERSION = 4.0;
939+
SWIFT_VERSION = 4.2;
939940
TARGETED_DEVICE_FAMILY = 1;
940941
};
941942
name = Release;
@@ -1056,7 +1057,7 @@
10561057
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
10571058
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
10581059
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1059-
SWIFT_VERSION = 4.0;
1060+
SWIFT_VERSION = 4.2;
10601061
};
10611062
name = Debug;
10621063
};
@@ -1075,7 +1076,7 @@
10751076
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
10761077
SWIFT_OBJC_BRIDGING_HEADER = "Supporting Files/ChartsDemo-Bridging-Header.h";
10771078
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
1078-
SWIFT_VERSION = 4.0;
1079+
SWIFT_VERSION = 4.2;
10791080
};
10801081
name = Release;
10811082
};

ChartsDemo-iOS/Swift/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
// Override point for customization after application launch.
1818
self.window = UIWindow(frame: UIScreen.main.bounds)
1919

ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
377377
PRODUCT_NAME = "$(TARGET_NAME)";
378378
PROVISIONING_PROFILE_SPECIFIER = "";
379-
SWIFT_VERSION = 4.0;
379+
SWIFT_VERSION = 4.2;
380380
};
381381
name = Debug;
382382
};
@@ -394,7 +394,7 @@
394394
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
395395
PRODUCT_NAME = "$(TARGET_NAME)";
396396
PROVISIONING_PROFILE_SPECIFIER = "";
397-
SWIFT_VERSION = 4.0;
397+
SWIFT_VERSION = 4.2;
398398
};
399399
name = Release;
400400
};
24.5 KB
Binary file not shown.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**Version 3.1.1**, synced to [MPAndroidChart #f6a398b](https://github.com/PhilJay/MPAndroidChart/commit/f6a398b)
1+
**Version 3.2.0**, synced to [MPAndroidChart #f6a398b](https://github.com/PhilJay/MPAndroidChart/commit/f6a398b)
22

33
![alt tag](https://raw.github.com/danielgindi/Charts/master/Assets/feature_graphic.png)
44
![Supported Platforms](https://img.shields.io/cocoapods/p/Charts.svg) [![Releases](https://img.shields.io/github/release/danielgindi/Charts.svg)](https://github.com/danielgindi/Charts/releases) [![Latest pod release](https://img.shields.io/cocoapods/v/Charts.svg)](http://cocoapods.org/pods/charts) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/danielgindi/Charts.svg?branch=master)](https://travis-ci.org/danielgindi/Charts) [![codecov](https://codecov.io/gh/danielgindi/Charts/branch/master/graph/badge.svg)](https://codecov.io/gh/danielgindi/Charts)
@@ -78,8 +78,8 @@ For [Realm](https://realm.io/) support, please add `pod 'ChartsRealm'` too.
7878
Charts now include Carthage prebuilt binaries.
7979

8080
```carthage
81-
github "danielgindi/Charts" == 3.1.1
82-
github "danielgindi/Charts" ~> 3.1.1
81+
github "danielgindi/Charts" == 3.2.0
82+
github "danielgindi/Charts" ~> 3.2.0
8383
```
8484

8585
In order to build the binaries for a new release, use `carthage build --no-skip-current && carthage archive Charts`.

Source/Charts/Charts/BarLineChartViewBase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,8 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
877877
let velocity = _panGestureRecognizer.velocity(in: self)
878878
if _data === nil || !isDragEnabled ||
879879
(self.hasNoDragOffset && self.isFullyZoomedOut && !self.isHighlightPerDragEnabled) ||
880-
(!_dragYEnabled && fabs(velocity.y) > fabs(velocity.x)) ||
881-
(!_dragXEnabled && fabs(velocity.y) < fabs(velocity.x))
880+
(!_dragYEnabled && abs(velocity.y) > abs(velocity.x)) ||
881+
(!_dragXEnabled && abs(velocity.y) < abs(velocity.x))
882882
{
883883
return false
884884
}

Source/Charts/Charts/PieChartView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ open class PieChartView: PieRadarChartViewBase
389389
{
390390
#if os(OSX)
391391
let paragraphStyle = NSParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
392-
paragraphStyle.lineBreakMode = NSParagraphStyle.LineBreakMode.byTruncatingTail
392+
paragraphStyle.lineBreakMode = NSLineBreakMode.byTruncatingTail
393393
#else
394394
let paragraphStyle = NSParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
395395
paragraphStyle.lineBreakMode = NSLineBreakMode.byTruncatingTail

0 commit comments

Comments
 (0)