Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Swift 5 #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions TwicketSegmentedControl.podspec

This file was deleted.

7 changes: 5 additions & 2 deletions TwicketSegmentedControl/TwicketSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol TwicketSegmentedControlDelegate: class {
}

open class TwicketSegmentedControl: UIControl {
open static let height: CGFloat = Constants.height + Constants.topBottomMargin * 2
public static let height: CGFloat = Constants.height + Constants.topBottomMargin * 2

private struct Constants {
static let height: CGFloat = 30
Expand Down Expand Up @@ -88,7 +88,7 @@ open class TwicketSegmentedControl: UIControl {
}
}

open var font: UIFont = UIFont.systemFont(ofSize: 15, weight: UIFontWeightMedium) {
open var font: UIFont = UIFont.systemFont(ofSize: 15, weight: UIFont.Weight.medium) {
didSet {
updateLabelsFont(with: font)
}
Expand Down Expand Up @@ -254,6 +254,9 @@ open class TwicketSegmentedControl: UIControl {
let location = panGesture.location(in: self)
sliderView.center.x = location.x - correction
case .possible: ()
@unknown default:
print("unknown gesture")
// NOTE: Idk what to do here, just updating swift versioning
}
}

Expand Down
18 changes: 18 additions & 0 deletions TwicketSegmentedControlDemo/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'TwicketSegmentedControl' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for TwicketSegmentedControl
pod 'TwicketSegmentedControl', :git => 'https://github.com/justinackermann/TwicketSegmentedControl.git'
end

target 'TwicketSegmentedControlDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for TwicketSegmentedControlDemo

end
21 changes: 21 additions & 0 deletions TwicketSegmentedControlDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PODS:
- TwicketSegmentedControl (0.1.2)

DEPENDENCIES:
- TwicketSegmentedControl (from `https://github.com/justinackermann/TwicketSegmentedControl.git`)

EXTERNAL SOURCES:
TwicketSegmentedControl:
:git: https://github.com/justinackermann/TwicketSegmentedControl.git

CHECKOUT OPTIONS:
TwicketSegmentedControl:
:commit: 3a5b403c5ff00a889aa7cd5eabd3cf9f4843cff6
:git: https://github.com/justinackermann/TwicketSegmentedControl.git

SPEC CHECKSUMS:
TwicketSegmentedControl: edb198a2314c219f9a26b9cfa121f6848f54a85a

PODFILE CHECKSUM: 607325b0ba9545c353876e6c0a7abcd7489e7d90

COCOAPODS: 1.9.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions TwicketSegmentedControlDemo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

770 changes: 770 additions & 0 deletions TwicketSegmentedControlDemo/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading