-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(SPM): Move package definition so it's resolvable by Xcode, and ad…
…apt the Example project
- Loading branch information
1 parent
b8cadea
commit 0cc8b8b
Showing
7 changed files
with
312 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
import WARangeSlider | ||
import UIKit | ||
|
||
class ViewController: UIViewController { | ||
let rangeSlider1 = RangeSlider(frame: CGRect.zero) | ||
let rangeSlider2 = RangeSlider(frame: CGRect.zero) | ||
let rangeSlider1 = RangeSlider(frame: CGRect.zero) | ||
let rangeSlider2 = RangeSlider(frame: CGRect.zero) | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
// Do any additional setup after loading the view, typically from a nib. | ||
rangeSlider2.trackHighlightTintColor = UIColor.red | ||
rangeSlider2.curvaceousness = 0.0 | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
// Do any additional setup after loading the view, typically from a nib. | ||
rangeSlider2.trackHighlightTintColor = UIColor.red | ||
rangeSlider2.curvaceousness = 0.0 | ||
|
||
view.addSubview(rangeSlider1) | ||
view.addSubview(rangeSlider2) | ||
view.addSubview(rangeSlider1) | ||
view.addSubview(rangeSlider2) | ||
|
||
rangeSlider1.addTarget(self, action: #selector(ViewController.rangeSliderValueChanged(_:)), for: .valueChanged) | ||
} | ||
rangeSlider1.addTarget(self, action: #selector(ViewController.rangeSliderValueChanged(_:)), for: .valueChanged) | ||
} | ||
|
||
override func viewDidLayoutSubviews() { | ||
let margin: CGFloat = 20.0 | ||
let width = view.bounds.width - 2.0 * margin | ||
rangeSlider1.frame = CGRect(x: margin, y: margin + 100, width: width, height: 31.0) | ||
rangeSlider2.frame = CGRect(x: margin + 20, y: 5 * margin + 100, | ||
width: width - 40, height: 40) | ||
} | ||
override func viewDidLayoutSubviews() { | ||
let margin: CGFloat = 20.0 | ||
let width = view.bounds.width - 2.0 * margin | ||
rangeSlider1.frame = CGRect(x: margin, y: margin + 100, width: width, height: 31.0) | ||
rangeSlider2.frame = CGRect(x: margin + 20, y: 5 * margin + 100, | ||
width: width - 40, height: 40) | ||
} | ||
|
||
@objc func rangeSliderValueChanged(_ rangeSlider: RangeSlider) { | ||
print("Range slider value changed: (\(rangeSlider.lowerValue) , \(rangeSlider.upperValue))") | ||
} | ||
@objc func rangeSliderValueChanged(_ rangeSlider: RangeSlider) { | ||
print("Range slider value changed: (\(rangeSlider.lowerValue) , \(rangeSlider.upperValue))") | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.