Skip to content

Commit

Permalink
added support for swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Efraim Budusan committed Sep 26, 2018
1 parent fb3e8ea commit e50cbde
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions TTSegmentedControl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ s.license = 'MIT'
s.name = "TTSegmentedControl"
s.summary = "An elegant, animated and customizable segmented control for iOS."
s.requires_arc = true
s.version = "0.4.5"
s.version = "0.4.6"
s.author = { "Igor Dumitru" => "igor.dumitru@tapptitude.com" }
s.homepage = "https://tapptitude.com/"
s.framework = "UIKit"
s.source = { :git => 'https://github.com/tapptitude/TTSegmentedControl.git', :tag => s.version }
s.source_files = 'TTSegmentedControl/*.{swift}'
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }

end
12 changes: 4 additions & 8 deletions TTSegmentedControl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
8193E5DE1F8A70A900E1604E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8193E5DC1F8A70A900E1604E /* LaunchScreen.storyboard */; };
8193E5E71F8A725700E1604E /* TTSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81535A881F88BD2A00398A9A /* TTSegmentedControl.swift */; };
8193E5E81F8A725800E1604E /* TTSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81535A881F88BD2A00398A9A /* TTSegmentedControl.swift */; };
8193E5E91F8A725B00E1604E /* TTSegmentedControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 81535A871F88BD2A00398A9A /* TTSegmentedControl.h */; };
8193E5EA1F8A725F00E1604E /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 81535A891F88BD2A00398A9A /* Info.plist */; };
8193E5EB1F8A725F00E1604E /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 81535A891F88BD2A00398A9A /* Info.plist */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -99,7 +97,6 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8193E5E91F8A725B00E1604E /* TTSegmentedControl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -194,7 +191,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8193E5EB1F8A725F00E1604E /* Info.plist in Resources */,
8193E5DE1F8A70A900E1604E /* LaunchScreen.storyboard in Resources */,
8193E5DB1F8A70A900E1604E /* Assets.xcassets in Resources */,
8193E5D91F8A70A900E1604E /* Main.storyboard in Resources */,
Expand Down Expand Up @@ -409,12 +405,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = CZT2X995U5;
DEVELOPMENT_TEAM = NF6484JE8F;
INFOPLIST_FILE = TTSegmentedControlSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.tapptitude.TTSegmentedControlSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -424,12 +420,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = CZT2X995U5;
DEVELOPMENT_TEAM = NF6484JE8F;
INFOPLIST_FILE = TTSegmentedControlSample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.tapptitude.TTSegmentedControlSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions TTSegmentedControl/TTSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ open class TTSegmentedControl: UIView {
public struct BounceOptions {
var springDamping:CGFloat = 0.7
var springInitialVelocity:CGFloat = 0.2
var options:UIViewAnimationOptions = .curveEaseInOut
var options:UIView.AnimationOptions = .curveEaseInOut
}

open var itemTitles: [String] = ["Item1", "Item2", "Item3"]
Expand Down Expand Up @@ -299,8 +299,8 @@ extension TTSegmentedControl {
let textColor = isSelected ? selectedTextColor : defaultTextColor
let textFont = isSelected ? selectedTextFont : defaultTextFont

let attributes = [NSAttributedStringKey.foregroundColor : textColor,
NSAttributedStringKey.font : textFont]
let attributes = [NSAttributedString.Key.foregroundColor : textColor,
NSAttributedString.Key.font : textFont]
let attributedString = NSMutableAttributedString(string: text, attributes: attributes)
return attributedString
}
Expand Down
2 changes: 1 addition & 1 deletion TTSegmentedControlSample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down

0 comments on commit e50cbde

Please sign in to comment.