Swift 3
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2014 Xavier Schott
|
||||
Copyright (c) 2017 Xavier Schott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE.
|
||||
136
README.md
|
|
@ -1,22 +1,23 @@
|
|||
# Slider with _ticks_ + animated Label
|
||||
TGPControls are drop-in replacement of `UISlider` & `UILabel`, with visual preview in **Interface Builder**.
|
||||
# Slider with _ticks_ & animated Label (Swift)
|
||||
TGPControls are drop-in replacement of `UISlider` & `UILabel`, with visual preview in **Interface Builder**, single liner instrumentation, smooth animations, simple API, powerful customization.
|
||||
|
||||
## What's DiscreteSlider?
|
||||

|
||||
|
||||
`TGPDiscreteSlider`: A slider with discrete steps, discrete range, with customizable track, thumb and ticks.
|
||||
Ideal to select steps.
|
||||
`TGPDiscreteSlider`: A slider with discrete steps (i.e. ticks), discrete range, with customizable track, thumb and ticks.
|
||||
Ideal to select individual steps, star rating, integers, rainbow colors, slices and in general any value that is not a continuum. Just set the number of stops, TGPDiscreteSlider handles the selection and the animations for you.
|
||||
|
||||
## What's CamelLabels?
|
||||

|
||||
|
||||
`TGPCamelLabels`: A set of animated labels representing a selection. Can be used alone or in conjunction with a UIControl.
|
||||
`TGPCamelLabels`: A set of animated labels (dock effect) representing a selection. Can be used alone or in conjunction with a UIControl.
|
||||
Ideal to represent steps. *The discrete slider and the camel labels can work in unison.*
|
||||
|
||||
## Compatibility
|
||||
1. Can be integrated with **Swift** or **Obj-C**
|
||||
2. `TGPControls` are **AutoLayout** ready, support **iOS 9 & iOS 8** `IB Designable` and `IB Inspectable` properties, yet runs as far back as **iOS 7**
|
||||
3. Comes with two demo applications, one in **Swift** and one in **Objective-C**
|
||||
1. Written in **Swift 3**, can be integrated with **Swift** or **Obj-C**
|
||||
2. `TGPControls` are **AutoLayout**, `IB Designable` and `IB Inspectable` ready (†)
|
||||
3. Version 3.0.0 comes with a **Swift 3** demo application, for **iOS 10** down to **8**.
|
||||
(†) Earlier 2.x versions provide **iOS 7** support
|
||||
|
||||

|
||||
|
||||
|
|
@ -42,43 +43,47 @@ Most customization can be done in **Interface Builder** and require **zero codin
|
|||
|
||||
## How to integrate
|
||||
Using [CocoaPods](http://cocoapods.org/?q=TGPControls)
|
||||
- **iOS 9 and later, iOS 8**: install CocoaPods 0.36.0+ [CocoaPods-Frameworks](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/), add `use_frameworks!` to your podfile.
|
||||
- **iOS 7**: restrict yourself to `TGPCamelLabels7.{h,m}` and `TGPDiscreteSlider7.{h,m}`. Compatible with CocoaPods 0.35.0.
|
||||
*Note: When integrating into an iOS 7 project, use the TGPCamelLabels7 and TGPDiscreteSlider7 classes in Interface Builder.*
|
||||
- **iOS 10 and later down to iOS 8**: install CocoaPods 1.2.0+ [CocoaPods-Frameworks](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/), add `use_frameworks!` to your podfile.
|
||||
- **iOS 7**: Use TGPControls version 2.1.0
|
||||
|
||||
Besides customization, which you can do entirely under Interface Builder in iOS 8 and later, both `TGPDiscreteSlider` and `TGPCamelLabels` require surprisingly little code to integrate.
|
||||
|
||||
### TGPDiscreteSlider
|
||||
### DiscreteSlider
|
||||
|
||||
For simplicity, TGPDiscreteSlider does *not* descend from UISlider but from **UIControl**.
|
||||
It uses a `minimumValue`, a `tickCount` and an `incrementValue` (instead of *minimumValue* and *maximumValue*).
|
||||
All graphic aspects, such as physical spacing of the ticks or physical width of the track are controlled internally.
|
||||
This makes TGPDiscreteSlider predictable. it is guaranteed to always fit snuggly inside its bounds.
|
||||
All graphic aspects, such as physical spacing of the ticks or physical width of the track are controlled internally. This makes TGPDiscreteSlider predictable. it is guaranteed to always fit snuggly inside its bounds.
|
||||
|
||||
**Step 1**: *register* to notifications (*just like any UIControl*)
|
||||
**Single step**: To use DiscreteSlider + CamelLabels in tandem, you need exactly **1 line of code**:
|
||||
```
|
||||
[self.discreteSlider addTarget:self
|
||||
action:@selector(discreteSliderValueChanged:)
|
||||
forControlEvents:UIControlEventValueChanged];
|
||||
discreteSlider.ticksListener = camelLabels
|
||||
```
|
||||
**Step 2**: *respond* to notification
|
||||

|
||||
That's all!
|
||||
Through the `TGPControlsTicksProtocol`, the camelLabels listen to _value_ and _size_ changes. You may want to adopt this protocol to handle changes, or use the traditional `UIControl` notifications:
|
||||
|
||||
**Advanced Steps (1a)**: *register* to notifications (*just like any UIControl*)
|
||||
```
|
||||
- (IBAction)discreteSliderValueChanged:(TGPDiscreteSlider *)sender {
|
||||
[self.camelLabels setValue:sender.value];
|
||||
discreteSlider.addTarget(self,
|
||||
action: #selector(valueChanged(_:event:)),
|
||||
for: .valueChanged)
|
||||
```
|
||||
**Advanced Steps (1b)**: *respond* to notification
|
||||
```
|
||||
func valueChanged(_ sender: TGPDiscreteSlider, event:UIEvent) {
|
||||
self.stepper.value = Double(sender.value)
|
||||
}
|
||||
```
|
||||
The above 6 lines of code are **all you need** to create this control:
|
||||
|
||||

|
||||
|
||||
**tickStyle, trackStyle, thumbStyle Properties:**
|
||||
|
||||
| Constant | Value | |
|
||||
|:--------------|:------------:| ----- |
|
||||
| `ComponentStyleIOS` | 0 | Gives to any component the iOS appearance: Ticks are invisible, track is blue and gray, thumb is round with a shadow |
|
||||
| `ComponentStyleRectangular` | 1 | Boxy look with hard edges |
|
||||
| `ComponentStyleRounded` | 2 | From rounded rectangles to perfects circles, depending on vertical to horizontal ratio |
|
||||
| `ComponentStyleInvisible` | 3 | Surprisingly useful to individually hide ticks, track, or even thumb |
|
||||
| `.iOS` | 0 | Gives to any component the iOS appearance: Ticks are invisible, track is blue and gray, thumb is round with a shadow |
|
||||
| `.rectangular` | 1 | Boxy look with hard edges |
|
||||
| `.rounded` | 2 | From rounded rectangles to perfects circles, depending on vertical to horizontal ratio |
|
||||
| `.invisible` | 3 | Surprisingly useful to individually hide ticks, track, or even thumb |
|
||||
|
||||
**Other Properties:**
|
||||
|
||||
|
|
@ -113,13 +118,14 @@ The above 6 lines of code are **all you need** to create this control:
|
|||
|
||||

|
||||
|
||||
### TGPCamelLabels
|
||||
### CamelLabels
|
||||
|
||||
Besides font customization, `TGPCamelLabels` only requires a set of labels (supplied as *strings*), and an active index selection.
|
||||
|
||||
**Step 1**: *tell* the TGPCamelLabels what to select
|
||||
_(Refer to **Single step** section above to use DiscreteSlider + CamelLabels in tandem)_
|
||||
```
|
||||
[self.camelLabels setValue:sender.value];
|
||||
camelLabels.value = sender.value
|
||||
```
|
||||
|
||||
*There is no step 2.*
|
||||
|
|
@ -129,20 +135,20 @@ Most of the customization can be done inside **Interface Builder**.
|
|||
|
||||
| Property | |
|
||||
|:---------| ----- |
|
||||
| `ticksListener` | ties a discrete slider to its camel labels. This is your most robust method to not only ensure that the layout of both controls match exactly, but also adjust this spacing when orientation changes. A typical use may be `self.discreteSlider.ticksListener = self.camelLabels` |
|
||||
| `names` | supplies a new set of labels ; supersedes the `tickCount` property, which will return the number of labels. A typical use may be `self.camelLabels.names = @[@"OFF", @"ON"]` |
|
||||
| `ticksDistance` | _override_ the labels spacing entirely ; **prefer** the `ticksListener` mechanism if it is available to you. A typical use may be `self.camelLabels.ticksDistance = 15` |
|
||||
| `ticksListener` | ties a discrete slider to its camel labels. This is your most robust method to not only ensure that the layout of both controls match exactly, but also adjust this spacing when orientation changes. A typical use may be `discreteSlider.ticksListener = camelLabels` |
|
||||
| `names` | supplies a new set of labels ; supersedes the `tickCount` property, which will return the number of labels. A typical use may be `camelLabels.names = ["OFF", "ON"]` |
|
||||
| `ticksDistance` | _override_ the labels spacing entirely ; **prefer** the `ticksListener` mechanism if it is available to you. A typical use may be `camelLabels.ticksDistance = 15` |
|
||||
| `value` | which label is emphasized (_selected_) |
|
||||
| `backgroundColor` | labels become *tap-through* (**click-through**) when set to `clearColor` ; use TGPCamelLabels *on top of* other UI elements, **even native iOS objects**!: |
|
||||
| `backgroundColor` | labels become *tap-through* (**click-through**) when set to `UIColor.clear` ; use TGPCamelLabels *on top of* other UI elements, **even native iOS objects**!: |
|
||||
|
||||
| Edges & Animation | |
|
||||
|:------------------| ----- |
|
||||
| `offCenter` | **leftmost and righmost labels only**: relative inset expressed as a proportion of individual label width: 0: none, +0.5: nudge in by a half width (fully fit) or -0.5: draw completely outside |
|
||||
| `insets` | **leftmost and righmost labels only**: absolute inset expressed in pixels |
|
||||
| `emphasisLayout` | emphasized (_selected_) labels vertical alignment ; `top`, `centerY` or `bottom`. Default is `top` (†) |
|
||||
| `regularLayout` | regular labels vertical alignment ; `top`, `centerY` or `bottom`. Default is `bottom` (†) |
|
||||
| `emphasisLayout` | emphasized (_selected_) labels vertical alignment ; `.top`, `.centerY` or `.bottom`. Default is `.top` (†) |
|
||||
| `regularLayout` | regular labels vertical alignment ; `.top`, `.centerY` or `.bottom`. Default is `.bottom` (†) |
|
||||
|
||||
(†) No camel animation will occur when `emphasisLayout` = `regularLayout`, i.e. `centerY`.
|
||||
(†) No camel animation will occur when `emphasisLayout` = `regularLayout`, i.e. `.centerY`.
|
||||
|
||||
| Emphasized labels | |
|
||||
|:------------------| ----- |
|
||||
|
|
@ -158,53 +164,41 @@ Most of the customization can be done inside **Interface Builder**.
|
|||
|
||||
### Code example
|
||||
|
||||
See **TGPControlsDemo** projects:
|
||||
1. `TGPControlsDemo` (iOS 9 & 8 + Swift + IBInspectable)
|
||||
2. `TGPControlsDemo7` (iOS 7 + ObjC) projects.
|
||||
See **TGPControlsDemo** project: `TGPControlsDemo` (Modern Swift syntax + IBInspectable)
|
||||
|
||||
```
|
||||
#import "ViewController.h"
|
||||
#import "TGPDiscreteSlider.h"
|
||||
#import "TGPCamelLabels.h"
|
||||
import UIKit
|
||||
import TGPControls
|
||||
|
||||
@interface ViewController ()
|
||||
@property (strong, nonatomic) IBOutlet TGPDiscreteSlider *oneTo10Slider;
|
||||
@property (strong, nonatomic) IBOutlet TGPCamelLabels *oneTo10Labels;
|
||||
class ViewController: UIViewController {
|
||||
@IBOutlet weak var oneTo10Labels: TGPCamelLabels!
|
||||
@IBOutlet weak var oneTo10Slider: TGPDiscreteSlider!
|
||||
@IBOutlet weak var alphabetLabels: TGPCamelLabels!
|
||||
@IBOutlet weak var alphabetSlider: TGPDiscreteSlider!
|
||||
@IBOutlet weak var switch1Camel: TGPCamelLabels!
|
||||
|
||||
@property (strong, nonatomic) IBOutlet TGPCamelLabels *alphabetLabels;
|
||||
@property (strong, nonatomic) IBOutlet TGPDiscreteSlider *alphabetSlider;
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@property (strong, nonatomic) IBOutlet TGPCamelLabels *switch1Camel;
|
||||
@property (strong, nonatomic) IBOutlet TGPCamelLabels *switch2Camel;
|
||||
@end
|
||||
alphabetLabels.names = ["A","B","C","D","E","F",
|
||||
"G","H","I","J","K","L","M",
|
||||
"N","O","P","Q","R","S",
|
||||
"T","U","V","W","X","Y","Z"]
|
||||
switch1Camel.names = ["OFF", "ON"]
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.alphabetLabels.names = @[@"A",@"B",@"C",@"D",@"E",@"F", @"G",@"H",@"I",@"J",@"K",@"L",@"M",
|
||||
@"N",@"O",@"P",@"Q",@"R",@"S", @"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
|
||||
self.switch1Camel.names = @[@"OFF", @"ON"];
|
||||
|
||||
// Automatically track tick spacing changes
|
||||
self.alphabetSlider.ticksListener = self.alphabetLabels;
|
||||
self.oneTo10Slider.ticksListener = self.oneTo10Labels;
|
||||
// Automatically track tick spacing and value changes
|
||||
alphabetSlider.ticksListener = alphabetLabels
|
||||
oneTo10Slider.ticksListener = oneTo10Labels
|
||||
}
|
||||
|
||||
#pragma mark UISwitch
|
||||
// MARK: - UISwitch
|
||||
|
||||
- (IBAction)switch1ValueChanged:(UISwitch *)sender {
|
||||
[self.switch1Camel setValue:((sender.isOn) ? 1 : 0)];
|
||||
@IBAction func switch1ValueChanged(_ sender: UISwitch) {
|
||||
switch1Camel.value = (sender.isOn) ? 1 : 0
|
||||
}
|
||||
|
||||
- (IBAction)switch2TouchUpInside:(UISwitch *)sender {
|
||||
[self.switch2Camel setValue:((sender.isOn) ? 1 : 0)];
|
||||
}
|
||||
|
||||
@end
|
||||
```
|
||||
### Customization example
|
||||
### Customization examples
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -1,98 +1,35 @@
|
|||
#
|
||||
# Be sure to run `pod spec lint TGPControls.podspec' to ensure this is a
|
||||
# valid spec and to remove all comments including this before submitting the spec.
|
||||
#
|
||||
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
|
||||
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
Pod::Spec.new do |spec|
|
||||
|
||||
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# These will help people to find your library, and whilst it
|
||||
# can feel like a chore to fill in it's definitely to your advantage. The
|
||||
# summary should be tweet-length, and the description more in depth.
|
||||
#
|
||||
spec.name = "TGPControls"
|
||||
spec.version = "3.0.0"
|
||||
spec.summary = "Custom animated iOS controls: Animated discrete slider, animated labels"
|
||||
|
||||
s.name = "TGPControls"
|
||||
s.version = "2.1.0"
|
||||
s.summary = "Custom Awesome iOS Controls: Animated discrete slider, animated labels"
|
||||
|
||||
s.description = <<-DESC
|
||||
spec.description = <<-DESC
|
||||
Provide an iOS looking UISlider with discrete, controlable steps
|
||||
Provide dynamic, animated labels for discrete slider
|
||||
Entirely compatible with UISlider
|
||||
|
||||
DESC
|
||||
|
||||
s.homepage = "https://github.com/arquebuse/TGPControls"
|
||||
s.screenshots = "https://cloud.githubusercontent.com/assets/4073988/5912371/144aaf24-a588-11e4-9a22-42832eb2c235.gif", "https://cloud.githubusercontent.com/assets/4073988/5912454/15774398-a589-11e4-8f08-18c9c7b59871.gif", "https://cloud.githubusercontent.com/assets/4073988/6628373/183c7452-c8c2-11e4-9a63-107805bc0cc4.gif", "https://cloud.githubusercontent.com/assets/4073988/5912297/c3f21bb2-a586-11e4-8eb1-a1f930ccbdd5.gif"
|
||||
|
||||
spec.homepage = "https://github.com/SwiftArchitect/TGPControls"
|
||||
spec.screenshots = "https://cloud.githubusercontent.com/assets/4073988/5912371/144aaf24-a588-11e4-9a22-42832eb2c235.gif", "https://cloud.githubusercontent.com/assets/4073988/5912454/15774398-a589-11e4-8f08-18c9c7b59871.gif", "https://cloud.githubusercontent.com/assets/4073988/6628373/183c7452-c8c2-11e4-9a63-107805bc0cc4.gif", "https://cloud.githubusercontent.com/assets/4073988/5912297/c3f21bb2-a586-11e4-8eb1-a1f930ccbdd5.gif"
|
||||
|
||||
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# Licensing your code is important. See http://choosealicense.com for more info.
|
||||
# CocoaPods will detect a license file if there is a named LICENSE*
|
||||
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
|
||||
#
|
||||
|
||||
# s.license = "MIT (example)"
|
||||
s.license = { :type => "MIT", :file => "TGPControls_License.txt" }
|
||||
|
||||
spec.license = { :type => "MIT", :file => "LICENSE" }
|
||||
|
||||
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# Specify the authors of the library, with email addresses. Email addresses
|
||||
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
|
||||
# accepts just a name if you'd rather not provide an email address.
|
||||
#
|
||||
# Specify a social_media_url where others can refer to, for example a twitter
|
||||
# profile URL.
|
||||
#
|
||||
|
||||
s.author = { "Xavier Schott" => "http://swiftarchitect.com/swiftarchitect/" }
|
||||
s.social_media_url = "https://twitter.com/swiftarchitect"
|
||||
|
||||
spec.author = { "Xavier Schott" => "http://swiftarchitect.com/swiftarchitect/" }
|
||||
|
||||
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# If this Pod runs only on iOS or OS X, then specify the platform and
|
||||
# the deployment target. You can optionally include the target after the platform.
|
||||
#
|
||||
|
||||
s.platform = :ios, "7.0"
|
||||
|
||||
spec.platform = :ios
|
||||
spec.ios.deployment_target = '8.0'
|
||||
spec.requires_arc = true
|
||||
|
||||
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# Specify the location from where the source should be retrieved.
|
||||
# Supports git, hg, bzr, svn and HTTP.
|
||||
#
|
||||
|
||||
s.source = { :git => "https://github.com/SwiftArchitect/TGPControls.git", :tag => "v2.1.0" }
|
||||
|
||||
|
||||
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# CocoaPods is smart about how it includes source code. For source files
|
||||
# giving a folder will include any h, m, mm, c & cpp files. For header
|
||||
# files it will include any header in the folder.
|
||||
# Not including the public_header_files will make all headers public.
|
||||
#
|
||||
|
||||
s.source_files = "TGPControls", "TGPControls/**/*.{h,m}"
|
||||
s.exclude_files = "TGPControlsDemo7/*", "TGPControlsDemo/*"
|
||||
s.public_header_files = "TGPControls/**/*.{h}"
|
||||
|
||||
|
||||
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
#
|
||||
# If your library depends on compiler flags you can set them in the xcconfig hash
|
||||
# where they will only apply to your library. If you depend on other Podspecs
|
||||
# you can include multiple dependencies to ensure it works.
|
||||
|
||||
s.requires_arc = true
|
||||
spec.source = { :git => "https://github.com/SwiftArchitect/TGPControls.git", :tag => "v3.0.0" }
|
||||
spec.source_files = "TGPControls/**/*.{swift}"
|
||||
spec.exclude_files = "TGPControlsDemo/*"
|
||||
|
||||
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
||||
spec.framework = "UIKit"
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,133 +7,82 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
DC0468E31A75962E0084DE3E /* TGPCamelLabels7.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0468E01A75962E0084DE3E /* TGPCamelLabels7.m */; };
|
||||
DC0468E41A75962E0084DE3E /* TGPDiscreteSlider7.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0468E21A75962E0084DE3E /* TGPDiscreteSlider7.m */; };
|
||||
DC0468E71A7596690084DE3E /* TGPCamelLabels.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0468E61A7596690084DE3E /* TGPCamelLabels.m */; };
|
||||
DC0468EA1A7596930084DE3E /* TGPDiscreteSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0468E91A7596930084DE3E /* TGPDiscreteSlider.m */; };
|
||||
DC101D661A75749600ECCF80 /* libTGPControls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC101D5A1A75749600ECCF80 /* libTGPControls.a */; };
|
||||
DC56BE021E46EA2000AAD0D9 /* TGPControls.h in Headers */ = {isa = PBXBuildFile; fileRef = DC56BE001E46EA2000AAD0D9 /* TGPControls.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
DC88CC4E1E46EAD10076AC65 /* TGPCamelLabels.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */; };
|
||||
DC88CC4F1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */; };
|
||||
DC88CC501E46EAD10076AC65 /* TGPDiscreteSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
DC101D671A75749600ECCF80 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = DC101D521A75749600ECCF80 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = DC101D591A75749600ECCF80;
|
||||
remoteInfo = TGPControls;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
DC101D581A75749600ECCF80 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "include/$(PRODUCT_NAME)";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
DC0468DF1A75962E0084DE3E /* TGPCamelLabels7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPCamelLabels7.h; sourceTree = "<group>"; };
|
||||
DC0468E01A75962E0084DE3E /* TGPCamelLabels7.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPCamelLabels7.m; sourceTree = "<group>"; };
|
||||
DC0468E11A75962E0084DE3E /* TGPDiscreteSlider7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPDiscreteSlider7.h; sourceTree = "<group>"; };
|
||||
DC0468E21A75962E0084DE3E /* TGPDiscreteSlider7.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPDiscreteSlider7.m; sourceTree = "<group>"; };
|
||||
DC0468E51A7596690084DE3E /* TGPCamelLabels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPCamelLabels.h; sourceTree = "<group>"; };
|
||||
DC0468E61A7596690084DE3E /* TGPCamelLabels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPCamelLabels.m; sourceTree = "<group>"; };
|
||||
DC0468E81A7596930084DE3E /* TGPDiscreteSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPDiscreteSlider.h; sourceTree = "<group>"; };
|
||||
DC0468E91A7596930084DE3E /* TGPDiscreteSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGPDiscreteSlider.m; sourceTree = "<group>"; };
|
||||
DC101D5A1A75749600ECCF80 /* libTGPControls.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTGPControls.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TGPControlsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC101D6B1A75749600ECCF80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DC101D7A1A75756300ECCF80 /* TGPControls_License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = TGPControls_License.txt; sourceTree = "<group>"; };
|
||||
DC101D7B1A75756300ECCF80 /* TGPControls.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = TGPControls.podspec; sourceTree = "<group>"; };
|
||||
DC28A54D1A947704003C9405 /* TGPControlsTicksProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGPControlsTicksProtocol.h; sourceTree = "<group>"; };
|
||||
DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TGPControls.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC56BE001E46EA2000AAD0D9 /* TGPControls.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TGPControls.h; sourceTree = "<group>"; };
|
||||
DC56BE011E46EA2000AAD0D9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPCamelLabels.swift; sourceTree = "<group>"; };
|
||||
DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPControlsTicksProtocol.swift; sourceTree = "<group>"; };
|
||||
DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGPDiscreteSlider.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
DC101D571A75749600ECCF80 /* Frameworks */ = {
|
||||
DC56BDF91E46EA2000AAD0D9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DC101D621A75749600ECCF80 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC101D661A75749600ECCF80 /* libTGPControls.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
DC0468DE1A75962E0084DE3E /* TGPControls */ = {
|
||||
DC56BDF31E46EA2000AAD0D9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0468E51A7596690084DE3E /* TGPCamelLabels.h */,
|
||||
DC0468E61A7596690084DE3E /* TGPCamelLabels.m */,
|
||||
DC28A54D1A947704003C9405 /* TGPControlsTicksProtocol.h */,
|
||||
DC0468E81A7596930084DE3E /* TGPDiscreteSlider.h */,
|
||||
DC0468E91A7596930084DE3E /* TGPDiscreteSlider.m */,
|
||||
DC0468DF1A75962E0084DE3E /* TGPCamelLabels7.h */,
|
||||
DC0468E01A75962E0084DE3E /* TGPCamelLabels7.m */,
|
||||
DC0468E11A75962E0084DE3E /* TGPDiscreteSlider7.h */,
|
||||
DC0468E21A75962E0084DE3E /* TGPDiscreteSlider7.m */,
|
||||
);
|
||||
path = TGPControls;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC101D511A75749600ECCF80 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC101D7A1A75756300ECCF80 /* TGPControls_License.txt */,
|
||||
DC101D7B1A75756300ECCF80 /* TGPControls.podspec */,
|
||||
DC0468DE1A75962E0084DE3E /* TGPControls */,
|
||||
DC101D691A75749600ECCF80 /* TGPControlsTests */,
|
||||
DC101D5B1A75749600ECCF80 /* Products */,
|
||||
DC56BDFF1E46EA2000AAD0D9 /* TGPControls */,
|
||||
DC56BDFE1E46EA2000AAD0D9 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC101D5B1A75749600ECCF80 /* Products */ = {
|
||||
DC56BDFE1E46EA2000AAD0D9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC101D5A1A75749600ECCF80 /* libTGPControls.a */,
|
||||
DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */,
|
||||
DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC101D691A75749600ECCF80 /* TGPControlsTests */ = {
|
||||
DC56BDFF1E46EA2000AAD0D9 /* TGPControls */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC101D6A1A75749600ECCF80 /* Supporting Files */,
|
||||
DC56BE001E46EA2000AAD0D9 /* TGPControls.h */,
|
||||
DC88CC4B1E46EAD10076AC65 /* TGPCamelLabels.swift */,
|
||||
DC88CC4C1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift */,
|
||||
DC88CC4D1E46EAD10076AC65 /* TGPDiscreteSlider.swift */,
|
||||
DC56BE011E46EA2000AAD0D9 /* Info.plist */,
|
||||
);
|
||||
path = TGPControlsTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC101D6A1A75749600ECCF80 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC101D6B1A75749600ECCF80 /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
path = TGPControls;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
DC56BDFA1E46EA2000AAD0D9 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC56BE021E46EA2000AAD0D9 /* TGPControls.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
DC101D591A75749600ECCF80 /* TGPControls */ = {
|
||||
DC56BDFC1E46EA2000AAD0D9 /* TGPControls */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DC101D6E1A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControls" */;
|
||||
buildConfigurationList = DC56BE051E46EA2000AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControls" */;
|
||||
buildPhases = (
|
||||
DC101D561A75749600ECCF80 /* Sources */,
|
||||
DC101D571A75749600ECCF80 /* Frameworks */,
|
||||
DC101D581A75749600ECCF80 /* CopyFiles */,
|
||||
DC56BDF81E46EA2000AAD0D9 /* Sources */,
|
||||
DC56BDF91E46EA2000AAD0D9 /* Frameworks */,
|
||||
DC56BDFA1E46EA2000AAD0D9 /* Headers */,
|
||||
DC56BDFB1E46EA2000AAD0D9 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
|
@ -141,64 +90,45 @@
|
|||
);
|
||||
name = TGPControls;
|
||||
productName = TGPControls;
|
||||
productReference = DC101D5A1A75749600ECCF80 /* libTGPControls.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
DC101D641A75749600ECCF80 /* TGPControlsTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DC101D711A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControlsTests" */;
|
||||
buildPhases = (
|
||||
DC101D611A75749600ECCF80 /* Sources */,
|
||||
DC101D621A75749600ECCF80 /* Frameworks */,
|
||||
DC101D631A75749600ECCF80 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
DC101D681A75749600ECCF80 /* PBXTargetDependency */,
|
||||
);
|
||||
name = TGPControlsTests;
|
||||
productName = TGPControlsTests;
|
||||
productReference = DC101D651A75749600ECCF80 /* TGPControlsTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
productReference = DC56BDFD1E46EA2000AAD0D9 /* TGPControls.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
DC101D521A75749600ECCF80 /* Project object */ = {
|
||||
DC56BDF41E46EA2000AAD0D9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0610;
|
||||
ORGANIZATIONNAME = arquebuse;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = SwiftArchitect;
|
||||
TargetAttributes = {
|
||||
DC101D591A75749600ECCF80 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
DC101D641A75749600ECCF80 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
DC56BDFC1E46EA2000AAD0D9 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = 55K7THBUV8;
|
||||
LastSwiftMigration = 0820;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = DC101D551A75749600ECCF80 /* Build configuration list for PBXProject "TGPControls" */;
|
||||
buildConfigurationList = DC56BDF71E46EA2000AAD0D9 /* Build configuration list for PBXProject "TGPControls" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = DC101D511A75749600ECCF80;
|
||||
productRefGroup = DC101D5B1A75749600ECCF80 /* Products */;
|
||||
mainGroup = DC56BDF31E46EA2000AAD0D9;
|
||||
productRefGroup = DC56BDFE1E46EA2000AAD0D9 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
DC101D591A75749600ECCF80 /* TGPControls */,
|
||||
DC101D641A75749600ECCF80 /* TGPControlsTests */,
|
||||
DC56BDFC1E46EA2000AAD0D9 /* TGPControls */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
DC101D631A75749600ECCF80 /* Resources */ = {
|
||||
DC56BDFB1E46EA2000AAD0D9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
|
|
@ -208,39 +138,24 @@
|
|||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
DC101D561A75749600ECCF80 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC0468E31A75962E0084DE3E /* TGPCamelLabels7.m in Sources */,
|
||||
DC0468E71A7596690084DE3E /* TGPCamelLabels.m in Sources */,
|
||||
DC0468E41A75962E0084DE3E /* TGPDiscreteSlider7.m in Sources */,
|
||||
DC0468EA1A7596930084DE3E /* TGPDiscreteSlider.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DC101D611A75749600ECCF80 /* Sources */ = {
|
||||
DC56BDF81E46EA2000AAD0D9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC88CC501E46EAD10076AC65 /* TGPDiscreteSlider.swift in Sources */,
|
||||
DC88CC4F1E46EAD10076AC65 /* TGPControlsTicksProtocol.swift in Sources */,
|
||||
DC88CC4E1E46EAD10076AC65 /* TGPCamelLabels.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
DC101D681A75749600ECCF80 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DC101D591A75749600ECCF80 /* TGPControls */;
|
||||
targetProxy = DC101D671A75749600ECCF80 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
DC101D6C1A75749600ECCF80 /* Debug */ = {
|
||||
DC56BE031E46EA2000AAD0D9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
|
@ -248,39 +163,52 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC101D6D1A75749600ECCF80 /* Release */ = {
|
||||
DC56BE041E46EA2000AAD0D9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
|
@ -288,110 +216,105 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DC101D6F1A75749600ECCF80 /* Debug */ = {
|
||||
DC56BE061E46EA2000AAD0D9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 55K7THBUV8;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = TGPControls/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControls;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC101D701A75749600ECCF80 /* Release */ = {
|
||||
DC56BE071E46EA2000AAD0D9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 55K7THBUV8;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = TGPControls/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControls;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DC101D721A75749600ECCF80 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = TGPControlsTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC101D731A75749600ECCF80 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = TGPControlsTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
DC101D551A75749600ECCF80 /* Build configuration list for PBXProject "TGPControls" */ = {
|
||||
DC56BDF71E46EA2000AAD0D9 /* Build configuration list for PBXProject "TGPControls" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC101D6C1A75749600ECCF80 /* Debug */,
|
||||
DC101D6D1A75749600ECCF80 /* Release */,
|
||||
DC56BE031E46EA2000AAD0D9 /* Debug */,
|
||||
DC56BE041E46EA2000AAD0D9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DC101D6E1A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControls" */ = {
|
||||
DC56BE051E46EA2000AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControls" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC101D6F1A75749600ECCF80 /* Debug */,
|
||||
DC101D701A75749600ECCF80 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DC101D711A75749600ECCF80 /* Build configuration list for PBXNativeTarget "TGPControlsTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC101D721A75749600ECCF80 /* Debug */,
|
||||
DC101D731A75749600ECCF80 /* Release */,
|
||||
DC56BE061E46EA2000AAD0D9 /* Debug */,
|
||||
DC56BE071E46EA2000AAD0D9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = DC101D521A75749600ECCF80 /* Project object */;
|
||||
rootObject = DC56BDF41E46EA2000AAD0D9 /* Project object */;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:TGPControls.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -13,12 +13,12 @@
|
|||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<string>3.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
// @file: TGPCamelLabels.h
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPCamelLabels7.h"
|
||||
|
||||
IB_DESIGNABLE
|
||||
@interface TGPCamelLabels : TGPCamelLabels7
|
||||
|
||||
@property (nonatomic) IBInspectable NSUInteger tickCount; // Only used if [labels count] < 1
|
||||
@property (nonatomic) IBInspectable CGFloat ticksDistance;
|
||||
@property (nonatomic) IBInspectable NSUInteger value;
|
||||
|
||||
@property (nonatomic) IBInspectable NSString * upFontName;
|
||||
@property (nonatomic) IBInspectable CGFloat upFontSize;
|
||||
@property (nonatomic) IBInspectable UIColor * upFontColor;
|
||||
|
||||
@property (nonatomic) IBInspectable NSString * downFontName;
|
||||
@property (nonatomic) IBInspectable CGFloat downFontSize;
|
||||
@property (nonatomic) IBInspectable UIColor * downFontColor;
|
||||
|
||||
@property (nonatomic) IBInspectable CGFloat offCenter;
|
||||
@property (nonatomic) IBInspectable NSInteger insets;
|
||||
|
||||
@property (nonatomic) IBInspectable NSInteger emphasisLayout;
|
||||
@property (nonatomic) IBInspectable NSInteger regularLayout;
|
||||
|
||||
@end
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
// @file: TGPCamelLabels.m
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPCamelLabels.h"
|
||||
|
||||
@implementation TGPCamelLabels
|
||||
|
||||
@dynamic tickCount;
|
||||
@dynamic ticksDistance;
|
||||
@dynamic value;
|
||||
@dynamic upFontName;
|
||||
@dynamic upFontSize;
|
||||
@dynamic upFontColor;
|
||||
@dynamic downFontName;
|
||||
@dynamic downFontSize;
|
||||
@dynamic downFontColor;
|
||||
@dynamic offCenter;
|
||||
@dynamic insets;
|
||||
@dynamic emphasisLayout;
|
||||
@dynamic regularLayout;
|
||||
@end
|
||||
|
|
@ -0,0 +1,398 @@
|
|||
// @file: TGPCamelLabels.swift
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import UIKit
|
||||
|
||||
|
||||
@IBDesignable
|
||||
public class TGPCamelLabels: UIControl {
|
||||
|
||||
let validAttributes = [NSLayoutAttribute.top.rawValue, // 3
|
||||
NSLayoutAttribute.centerY.rawValue, // 10
|
||||
NSLayoutAttribute.bottom.rawValue] // 4
|
||||
|
||||
// Only used if labels.count < 1
|
||||
@IBInspectable public var tickCount:Int {
|
||||
get {
|
||||
return names.count
|
||||
}
|
||||
set {
|
||||
// Put some order to tickCount: 1 >= count >= 128
|
||||
let count = max(1, min(newValue, 128))
|
||||
debugNames(count: count)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var ticksDistance:CGFloat = 44.0 {
|
||||
didSet {
|
||||
ticksDistance = max(0, ticksDistance)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var value:UInt = 0 {
|
||||
didSet {
|
||||
dockEffect(duration: animationDuration)
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var upFontName:String? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var upFontSize:CGFloat = 12 {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var upFontColor:UIColor? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var downFontName:String? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var downFontSize:CGFloat = 12 {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var downFontColor:UIColor? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// Label off-center to the left and right of the slider
|
||||
// expressed in label width. 0: none, -1/2: half outside, 1/2; half inside
|
||||
@IBInspectable public var offCenter:CGFloat = 0 {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// Label margins to the left and right of the slider
|
||||
@IBInspectable public var insets:NSInteger = 0 {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// Where should emphasized labels be drawn (10: centerY, 3: top, 4: bottom)
|
||||
// By default, emphasized labels are animated towards the top of the frame.
|
||||
// This creates the dock effect (camel). They can also be centered vertically, or move down (reverse effect).
|
||||
@IBInspectable public var emphasisLayout:Int = NSLayoutAttribute.top.rawValue {
|
||||
didSet {
|
||||
if !validAttributes.contains(emphasisLayout) {
|
||||
emphasisLayout = NSLayoutAttribute.top.rawValue
|
||||
}
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// Where should regular labels be drawn (10: centerY, 3: top, 4: bottom)
|
||||
// By default, emphasized labels are animated towards the bottom of the frame.
|
||||
// This creates the dock effect (camel). They can also be centered vertically, or move up (reverse effect).
|
||||
@IBInspectable public var regularLayout:Int = NSLayoutAttribute.bottom.rawValue {
|
||||
didSet {
|
||||
if !validAttributes.contains(regularLayout) {
|
||||
regularLayout = NSLayoutAttribute.bottom.rawValue
|
||||
}
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: @IBInspectable adapters
|
||||
|
||||
public var emphasisLayoutAttribute:NSLayoutAttribute {
|
||||
get {
|
||||
return NSLayoutAttribute(rawValue: emphasisLayout) ?? .top
|
||||
}
|
||||
set {
|
||||
emphasisLayout = newValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
public var regularLayoutAttribute:NSLayoutAttribute {
|
||||
get {
|
||||
return NSLayoutAttribute(rawValue: regularLayout) ?? .bottom
|
||||
}
|
||||
set {
|
||||
regularLayout = newValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
public var names:[String] = [] { // Will dictate the number of ticks
|
||||
didSet {
|
||||
assert(names.count > 0)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// When bounds change, recalculate layout
|
||||
override public var bounds: CGRect {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
public var animationDuration:TimeInterval = 0.15
|
||||
|
||||
// Private
|
||||
var lastValue = NSNotFound
|
||||
var emphasizedLabels:[UILabel] = []
|
||||
var regularLabels:[UILabel] = []
|
||||
|
||||
// MARK: UIView
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
initProperties()
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
initProperties()
|
||||
}
|
||||
|
||||
// clickthrough
|
||||
public override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
||||
for view in subviews {
|
||||
if !view.isHidden &&
|
||||
view.alpha > 0.0 &&
|
||||
view.isUserInteractionEnabled &&
|
||||
view.point(inside: convert(point, to: view), with: event) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MARK: TGPCamelLabels
|
||||
|
||||
func initProperties() {
|
||||
debugNames(count: 10)
|
||||
layoutTrack()
|
||||
}
|
||||
|
||||
func debugNames(count:Int) {
|
||||
// Dynamic property, will create an array with labels, generally for debugging purposes
|
||||
var array:[String] = []
|
||||
for iterate in 1...count {
|
||||
array.append("\(iterate)")
|
||||
}
|
||||
names = array
|
||||
}
|
||||
|
||||
func layoutTrack() {
|
||||
|
||||
func insetLabel(_ label:UILabel?, withInset inset:NSInteger, andMultiplier multiplier:CGFloat) {
|
||||
assert(label != nil)
|
||||
if let label = label {
|
||||
label.frame = {
|
||||
var frame = label.frame
|
||||
frame.origin.x += frame.size.width * multiplier
|
||||
frame.origin.x += CGFloat(inset)
|
||||
return frame
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
for label in emphasizedLabels {
|
||||
label.removeFromSuperview()
|
||||
}
|
||||
emphasizedLabels = []
|
||||
for label in regularLabels {
|
||||
label.removeFromSuperview()
|
||||
}
|
||||
regularLabels = []
|
||||
|
||||
let count = names.count
|
||||
if count > 0 {
|
||||
var centerX = (bounds.width - (CGFloat(count - 1) * ticksDistance))/2.0
|
||||
let centerY = bounds.height / 2.0
|
||||
for name in names {
|
||||
let upLabel = UILabel.init()
|
||||
emphasizedLabels.append(upLabel)
|
||||
upLabel.text = name
|
||||
if let upFontName = upFontName {
|
||||
upLabel.font = UIFont.init(name: upFontName, size: upFontSize)
|
||||
} else {
|
||||
upLabel.font = UIFont.boldSystemFont(ofSize: upFontSize)
|
||||
}
|
||||
if let textColor = upFontColor ?? tintColor {
|
||||
upLabel.textColor = textColor
|
||||
}
|
||||
upLabel.sizeToFit()
|
||||
upLabel.center = CGPoint(x: centerX, y: centerY)
|
||||
|
||||
upLabel.frame = {
|
||||
var frame = upLabel.frame
|
||||
frame.origin.y = bounds.height - frame.height
|
||||
return frame
|
||||
}()
|
||||
|
||||
upLabel.alpha = 0.0
|
||||
addSubview(upLabel)
|
||||
|
||||
let dnLabel = UILabel.init()
|
||||
regularLabels.append(dnLabel)
|
||||
dnLabel.text = name
|
||||
if let downFontName = downFontName {
|
||||
dnLabel.font = UIFont.init(name:downFontName, size:downFontSize)
|
||||
} else {
|
||||
dnLabel.font = UIFont.boldSystemFont(ofSize: downFontSize)
|
||||
}
|
||||
dnLabel.textColor = downFontColor ?? UIColor.gray
|
||||
dnLabel.sizeToFit()
|
||||
dnLabel.center = CGPoint(x:centerX, y:centerY)
|
||||
dnLabel.frame = {
|
||||
var frame = dnLabel.frame
|
||||
frame.origin.y = bounds.height - frame.height
|
||||
return frame
|
||||
}()
|
||||
addSubview(dnLabel)
|
||||
|
||||
centerX += ticksDistance
|
||||
}
|
||||
|
||||
// Fix left and right label, if there are at least 2 labels
|
||||
if names.count > 1 {
|
||||
insetLabel(emphasizedLabels.first, withInset: insets, andMultiplier: offCenter)
|
||||
insetLabel(emphasizedLabels.last, withInset: -insets, andMultiplier: -offCenter)
|
||||
insetLabel(regularLabels.first, withInset: insets, andMultiplier: offCenter)
|
||||
insetLabel(regularLabels.last, withInset: -insets, andMultiplier: -offCenter)
|
||||
}
|
||||
|
||||
dockEffect(duration:0.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func dockEffect(duration:TimeInterval)
|
||||
{
|
||||
let emphasized = Int(value)
|
||||
|
||||
// Unlike the National Parks from which it is inspired, this Dock Effect
|
||||
// does not abruptly change from BOLD to plain. Instead, we have 2 sets of
|
||||
// labels, which are faded back and forth, in unisson.
|
||||
// - BOLD to plain
|
||||
// - Black to gray
|
||||
// - high to low
|
||||
// Each animation picks up where the previous left off
|
||||
let moveBlock:() -> Void = {
|
||||
// De-emphasize almost all
|
||||
for (idx, label) in self.emphasizedLabels.enumerated() {
|
||||
if emphasized != idx {
|
||||
self.verticalAlign(aView: label,
|
||||
alpha: 0,
|
||||
attribute: self.regularLayoutAttribute)
|
||||
}
|
||||
}
|
||||
for (idx, label) in self.regularLabels.enumerated() {
|
||||
if emphasized != idx {
|
||||
self.verticalAlign(aView: label,
|
||||
alpha: 1,
|
||||
attribute: self.regularLayoutAttribute)
|
||||
}
|
||||
}
|
||||
|
||||
// Emphasize the selection
|
||||
if emphasized < self.emphasizedLabels.count {
|
||||
self.verticalAlign(aView: self.emphasizedLabels[emphasized],
|
||||
alpha:1,
|
||||
attribute: self.emphasisLayoutAttribute)
|
||||
}
|
||||
if emphasized < self.regularLabels.count {
|
||||
self.verticalAlign(aView: self.regularLabels[emphasized],
|
||||
alpha:0,
|
||||
attribute: self.emphasisLayoutAttribute)
|
||||
}
|
||||
}
|
||||
|
||||
if duration > 0 {
|
||||
UIView.animate(withDuration: duration,
|
||||
delay: 0,
|
||||
options: [.beginFromCurrentState, .curveLinear],
|
||||
animations: moveBlock,
|
||||
completion: nil)
|
||||
} else {
|
||||
moveBlock()
|
||||
}
|
||||
}
|
||||
|
||||
func verticalAlign(aView:UIView, alpha alpha:CGFloat, attribute layout:NSLayoutAttribute) {
|
||||
switch layout {
|
||||
case .top:
|
||||
aView.frame = {
|
||||
var frame = aView.frame
|
||||
frame.origin.y = 0
|
||||
return frame
|
||||
}()
|
||||
|
||||
case .bottom:
|
||||
aView.frame = {
|
||||
var frame = aView.frame
|
||||
frame.origin.y = bounds.height - frame.height
|
||||
return frame
|
||||
}()
|
||||
|
||||
default: // .center
|
||||
aView.frame = {
|
||||
var frame = aView.frame
|
||||
frame.origin.y = (bounds.height - frame.height) / 2
|
||||
return frame
|
||||
}()
|
||||
}
|
||||
aView.alpha = alpha
|
||||
}
|
||||
}
|
||||
|
||||
extension TGPCamelLabels : TGPControlsTicksProtocol {
|
||||
public func tgpTicksDistanceChanged(ticksDistance: CGFloat, sender: AnyObject) {
|
||||
self.ticksDistance = ticksDistance
|
||||
}
|
||||
|
||||
public func tgpValueChanged(value: UInt) {
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
// @file: TGPCamelLabels7.h
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created July 4th, 2014 (Independence Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TGPControlsTicksProtocol.h"
|
||||
|
||||
@interface TGPCamelLabels7 : UIControl <TGPControlsTicksProtocol>
|
||||
|
||||
@property (nonatomic, assign) NSUInteger tickCount; // Only used if [labels count] < 1
|
||||
@property (nonatomic, assign) CGFloat ticksDistance;
|
||||
@property (nonatomic, assign) NSUInteger value;
|
||||
|
||||
@property (nonatomic, strong) NSString * upFontName;
|
||||
@property (nonatomic, assign) CGFloat upFontSize;
|
||||
@property (nonatomic, strong) UIColor * upFontColor;
|
||||
|
||||
@property (nonatomic, strong) NSString * downFontName;
|
||||
@property (nonatomic, assign) CGFloat downFontSize;
|
||||
@property (nonatomic, strong) UIColor * downFontColor;
|
||||
|
||||
@property (nonatomic, strong) NSArray * names; // Will dictate the number of ticks
|
||||
@property (nonatomic, assign) NSTimeInterval animationDuration;
|
||||
|
||||
// Label off-center to the left and right of the slider, expressed in label width. 0: none, -1/2 half out, 1/2 half in
|
||||
@property (nonatomic, assign) CGFloat offCenter;
|
||||
|
||||
// Label margins to the left and right of the slider
|
||||
@property (nonatomic, assign) NSInteger insets;
|
||||
|
||||
// Where should emphasized labels be drawn (10: centerY, 3: top, 4: bottom)
|
||||
// By default, emphasized labels are animated towards the top of the frame.
|
||||
// This creates the dock effect (camel). They can also be centered vertically, or move down (reverse effect).
|
||||
@property (nonatomic) IBInspectable NSInteger emphasisLayout;
|
||||
|
||||
// Where should regular labels be drawn (10: centerY, 3: top, 4: bottom)
|
||||
// By default, emphasized labels are animated towards the bottom of the frame.
|
||||
// This creates the dock effect (camel). They can also be centered vertically, or move up (reverse effect).
|
||||
@property (nonatomic) IBInspectable NSInteger regularLayout;
|
||||
|
||||
#pragma mark IBInspectable adapters
|
||||
|
||||
@property (nonatomic) NSLayoutAttribute emphasisLayoutAttribute;
|
||||
@property (nonatomic) NSLayoutAttribute regularLayoutAttribute;
|
||||
|
||||
@end
|
||||
|
|
@ -1,401 +0,0 @@
|
|||
// @file: TGPCamelLabels7.m
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created July 4th, 2014 (Independence Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPCamelLabels7.h"
|
||||
|
||||
@interface TGPCamelLabels7()
|
||||
@property (nonatomic, assign) NSUInteger lastValue;
|
||||
@property (nonatomic, retain) NSMutableArray * emphasizedLabels;
|
||||
@property (nonatomic, retain) NSMutableArray * regularLabels;
|
||||
@end
|
||||
|
||||
@implementation TGPCamelLabels7
|
||||
|
||||
#pragma mark properties
|
||||
|
||||
- (void)setTickCount:(NSUInteger)tickCount {
|
||||
// calculated property
|
||||
// Put some order to tickCount: 1 >= count >= 128
|
||||
const unsigned int count = (unsigned int) MAX(1, MIN(tickCount, 128));
|
||||
[self debugNames:count];
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (NSUInteger)tickCount {
|
||||
// Dynamic property
|
||||
return [_names count];
|
||||
}
|
||||
|
||||
- (void)setTicksDistance:(CGFloat)ticksDistance {
|
||||
_ticksDistance = MAX(0, ticksDistance);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setValue:(NSUInteger)value {
|
||||
_value = value;
|
||||
[self dockEffect:self.animationDuration];
|
||||
}
|
||||
|
||||
- (void)setUpFontName:(NSString *)upFontName {
|
||||
_upFontName = upFontName;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setUpFontSize:(CGFloat)upFontSize {
|
||||
_upFontSize = upFontSize;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setUpFontColor:(UIColor *)upFontColor {
|
||||
_upFontColor = upFontColor;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setDownFontName:(NSString *)downFontName {
|
||||
_downFontName = downFontName;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setDownFontSize:(CGFloat)downFontSize {
|
||||
_downFontSize = downFontSize;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setDownFontColor:(UIColor *)downFontColor {
|
||||
_downFontColor = downFontColor;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setOffCenter:(CGFloat)offCenter {
|
||||
_offCenter = offCenter;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setInsets:(NSInteger)insets {
|
||||
_insets = insets;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setEmphasisLayout:(NSInteger)emphasisLayout {
|
||||
_emphasisLayout = ([self validAttribute:emphasisLayout]
|
||||
? emphasisLayout
|
||||
: NSLayoutAttributeTop);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setRegularLayout:(NSInteger)regularLayout {
|
||||
_regularLayout = ([self validAttribute:regularLayout]
|
||||
? regularLayout
|
||||
: NSLayoutAttributeBottom);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
// NSArray<NSString*>
|
||||
- (void)setNames:(NSArray *)names {
|
||||
NSAssert(names.count > 0, @"names.count");
|
||||
_names = names;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
#pragma mark IBInspectable adapters
|
||||
|
||||
- (NSLayoutAttribute)emphasisLayoutAttribute {
|
||||
return ([self validAttribute:_emphasisLayout]
|
||||
? _emphasisLayout
|
||||
: NSLayoutAttributeTop);
|
||||
}
|
||||
|
||||
- (void)setEmphasisLayoutAttribute:(NSLayoutAttribute)emphasisLayoutAttribute {
|
||||
self.emphasisLayout = emphasisLayoutAttribute;
|
||||
}
|
||||
|
||||
- (NSLayoutAttribute)regularLayoutAttribute {
|
||||
return ([self validAttribute:_regularLayout]
|
||||
? _regularLayout
|
||||
: NSLayoutAttributeBottom);
|
||||
}
|
||||
|
||||
- (void)setRegularLayoutAttribute:(NSLayoutAttribute)regularLayoutAttribute {
|
||||
self.regularLayout = regularLayoutAttribute;
|
||||
}
|
||||
|
||||
#pragma mark UIView
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self != nil) {
|
||||
[self initProperties];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if(self != nil) {
|
||||
[self initProperties];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
// When bounds change, recalculate layout
|
||||
- (void)setBounds:(CGRect)bounds
|
||||
{
|
||||
[super setBounds:bounds];
|
||||
[self layoutTrack];
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
// clickthrough
|
||||
-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
for (UIView *view in self.subviews) {
|
||||
if (!view.hidden && view.alpha > 0 && view.userInteractionEnabled && [view pointInside:[self convertPoint:point toView:view] withEvent:event])
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark TGPCamelLabels
|
||||
|
||||
- (void)initProperties {
|
||||
_ticksDistance = 44.0;
|
||||
_value = 0;
|
||||
[self debugNames:10];
|
||||
|
||||
_upFontName = nil;
|
||||
_upFontSize = 12;
|
||||
_upFontColor = nil;
|
||||
|
||||
_downFontName = nil;
|
||||
_downFontSize = 12;
|
||||
_downFontColor = nil;
|
||||
|
||||
_emphasizedLabels = [NSMutableArray array];
|
||||
_regularLabels = [NSMutableArray array];
|
||||
|
||||
_lastValue = NSNotFound; // Never tapped
|
||||
_animationDuration = 0.15;
|
||||
|
||||
_offCenter = 0.0;
|
||||
_insets = 0;
|
||||
|
||||
_emphasisLayout = NSLayoutAttributeTop;
|
||||
_regularLayout = NSLayoutAttributeBottom;
|
||||
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)debugNames:(unsigned int)count {
|
||||
// Dynamic property, will create an array with labels, generally for debugging purposes
|
||||
const NSMutableArray * array = [NSMutableArray array];
|
||||
for(int iterate = 1; iterate <= count; iterate++) {
|
||||
[array addObject:[NSString stringWithFormat:@"%d", iterate ]];
|
||||
}
|
||||
[self setNames:(NSArray *) array];
|
||||
}
|
||||
|
||||
- (void)layoutTrack {
|
||||
for( UIView * view in self.emphasizedLabels) {
|
||||
[view removeFromSuperview];
|
||||
}
|
||||
[self.emphasizedLabels removeAllObjects];
|
||||
for( UIView * view in self.regularLabels) {
|
||||
[view removeFromSuperview];
|
||||
}
|
||||
[self.regularLabels removeAllObjects];
|
||||
|
||||
const NSUInteger count = self.names.count;
|
||||
if( count > 0) {
|
||||
CGFloat centerX = (self.bounds.size.width - ((count - 1) * self.ticksDistance))/2.0;
|
||||
const CGFloat centerY = self.bounds.size.height / 2.0;
|
||||
for(NSString * name in self.names) {
|
||||
UILabel * upLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
[self.emphasizedLabels addObject:upLabel];
|
||||
upLabel.text = name;
|
||||
upLabel.font = ((self.upFontName != nil)
|
||||
? [UIFont fontWithName:self.upFontName size:self.upFontSize]
|
||||
: [UIFont boldSystemFontOfSize:self.upFontSize]);
|
||||
upLabel.textColor = ((self.upFontColor != nil)
|
||||
? self.upFontColor
|
||||
: self.tintColor);
|
||||
[upLabel sizeToFit];
|
||||
upLabel.center = CGPointMake(centerX, centerY);
|
||||
upLabel.frame = ({
|
||||
CGRect frame = upLabel.frame;
|
||||
frame.origin.y = self.bounds.size.height - frame.size.height;
|
||||
frame;
|
||||
});
|
||||
upLabel.alpha = 0.0;
|
||||
[self addSubview:upLabel];
|
||||
|
||||
UILabel * dnLabel = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
[self.regularLabels addObject:dnLabel];
|
||||
dnLabel.text = name;
|
||||
dnLabel.font = ((self.downFontName != nil)
|
||||
? [UIFont fontWithName:self.downFontName size:self.downFontSize]
|
||||
: [UIFont boldSystemFontOfSize:self.downFontSize]);
|
||||
dnLabel.textColor = ((self.downFontColor != nil)
|
||||
? self.downFontColor
|
||||
: [UIColor grayColor]);
|
||||
[dnLabel sizeToFit];
|
||||
dnLabel.center = CGPointMake(centerX, centerY);
|
||||
dnLabel.frame = ({
|
||||
CGRect frame = dnLabel.frame;
|
||||
frame.origin.y = self.bounds.size.height - frame.size.height;
|
||||
frame;
|
||||
});
|
||||
[self addSubview:dnLabel];
|
||||
|
||||
centerX += self.ticksDistance;
|
||||
}
|
||||
|
||||
// Fix left and right label, if there are at least 2 labels
|
||||
if( [self.names count] > 1) {
|
||||
[self insetView:[self.emphasizedLabels firstObject] withInset:self.insets withMultiplier:self.offCenter];
|
||||
[self insetView:[self.emphasizedLabels lastObject] withInset:-self.insets withMultiplier:-self.offCenter];
|
||||
[self insetView:[self.regularLabels firstObject] withInset:self.insets withMultiplier:self.offCenter];
|
||||
[self insetView:[self.regularLabels lastObject] withInset:-self.insets withMultiplier:-self.offCenter];
|
||||
}
|
||||
|
||||
[self dockEffect:0.0];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) insetView:(UIView*)view withInset:(NSInteger)inset withMultiplier:(CGFloat)multiplier {
|
||||
view.frame = ({
|
||||
CGRect frame = view.frame;
|
||||
frame.origin.x += frame.size.width * multiplier;
|
||||
frame.origin.x += inset;
|
||||
frame;
|
||||
});
|
||||
}
|
||||
|
||||
- (void)dockEffect:(NSTimeInterval)duration
|
||||
{
|
||||
const NSUInteger emphasized = self.value;
|
||||
|
||||
// Unlike the National Parks from which it is inspired, this Dock Effect
|
||||
// does not abruptly change from BOLD to plain. Instead, we have 2 sets of
|
||||
// labels, which are faded back and forth, in unisson.
|
||||
// - BOLD to plain
|
||||
// - Black to gray
|
||||
// - high to low
|
||||
// Each animation picks up where the previous left off
|
||||
void (^moveBlock)() = ^void() {
|
||||
// De-emphasize almost all
|
||||
[self.emphasizedLabels enumerateObjectsUsingBlock:^(UILabel * label, NSUInteger idx, BOOL *stop) {
|
||||
if( emphasized != idx) {
|
||||
[self verticalAlign:label
|
||||
alpha:0
|
||||
attribute:self.regularLayoutAttribute];
|
||||
}
|
||||
}];
|
||||
[self.regularLabels enumerateObjectsUsingBlock:^(UILabel * label, NSUInteger idx, BOOL *stop) {
|
||||
if( emphasized != idx) {
|
||||
[self verticalAlign:label
|
||||
alpha:1
|
||||
attribute:self.regularLayoutAttribute];
|
||||
}
|
||||
}];
|
||||
|
||||
// Emphasize the selection
|
||||
if(emphasized < [self.emphasizedLabels count]) {
|
||||
[self verticalAlign:[self.emphasizedLabels objectAtIndex:emphasized]
|
||||
alpha:1
|
||||
attribute:self.emphasisLayoutAttribute];
|
||||
}
|
||||
if(emphasized < [self.regularLabels count]) {
|
||||
[self verticalAlign:[self.regularLabels objectAtIndex:emphasized]
|
||||
alpha:0
|
||||
attribute:self.emphasisLayoutAttribute];
|
||||
}
|
||||
};
|
||||
|
||||
if(duration > 0) {
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:(UIViewAnimationOptionBeginFromCurrentState +
|
||||
UIViewAnimationOptionCurveLinear)
|
||||
animations:moveBlock
|
||||
completion:nil];
|
||||
} else {
|
||||
moveBlock();
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)validAttribute:(NSLayoutAttribute)attribute {
|
||||
NSArray * validAttributes = @[
|
||||
@(NSLayoutAttributeTop), // 3
|
||||
@(NSLayoutAttributeCenterY), // 10
|
||||
@(NSLayoutAttributeBottom) // 4
|
||||
];
|
||||
BOOL valid = [validAttributes containsObject:@(attribute)];
|
||||
return valid;
|
||||
}
|
||||
|
||||
- (void)verticalAlign:(UIView *)aView alpha:(CGFloat) alpha attribute:(NSLayoutAttribute) layout {
|
||||
switch(layout) {
|
||||
case NSLayoutAttributeTop:
|
||||
aView.frame = ({
|
||||
CGRect frame = aView.frame;
|
||||
frame.origin.y = 0;
|
||||
frame;
|
||||
});
|
||||
break;
|
||||
|
||||
case NSLayoutAttributeBottom:
|
||||
aView.frame = ({
|
||||
CGRect frame = aView.frame;
|
||||
frame.origin.y = self.bounds.size.height - frame.size.height;
|
||||
frame;
|
||||
});
|
||||
break;
|
||||
|
||||
default: // NSLayoutAttributeCenterY
|
||||
aView.frame = ({
|
||||
CGRect frame = aView.frame;
|
||||
frame.origin.y = (self.bounds.size.height - frame.size.height) / 2;
|
||||
frame;
|
||||
});
|
||||
}
|
||||
aView.alpha = alpha;
|
||||
}
|
||||
|
||||
#pragma mark - TGPControlsTicksProtocol
|
||||
|
||||
- (void)tgpTicksDistanceChanged:(CGFloat)ticksDistance sender:(id)sender
|
||||
{
|
||||
self.ticksDistance = ticksDistance;
|
||||
}
|
||||
|
||||
- (void)tgpValueChanged:(unsigned int)value
|
||||
{
|
||||
self.value = value;
|
||||
}
|
||||
@end
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
// @file: TGPControlsTicksProtocol.h
|
||||
// @file: TGPControls.h
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -28,11 +27,14 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
@protocol TGPControlsTicksProtocol<NSObject>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for TGPControls.
|
||||
FOUNDATION_EXPORT double TGPControlsVersionNumber;
|
||||
|
||||
//! Project version string for TGPControls.
|
||||
FOUNDATION_EXPORT const unsigned char TGPControlsVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <TGPControls/PublicHeader.h>
|
||||
|
||||
@required
|
||||
- (void)tgpTicksDistanceChanged:(CGFloat)ticksDistance sender:(id)sender;
|
||||
|
||||
@optional
|
||||
- (void)tgpValueChanged:(unsigned int)value;
|
||||
@end
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
// @file: ViewController.h
|
||||
// @project: TGPControlsDemo7 (TGPControls)
|
||||
// @file: TGPControlsTicksProtocol.swift
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -28,10 +27,10 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ViewController : UIViewController
|
||||
|
||||
|
||||
@end
|
||||
import Foundation
|
||||
|
||||
public protocol TGPControlsTicksProtocol
|
||||
{
|
||||
func tgpTicksDistanceChanged(ticksDistance:CGFloat, sender:AnyObject)
|
||||
func tgpValueChanged(value:UInt)
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
// @file: TGPDiscreteSlider.h
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPDiscreteSlider7.h"
|
||||
|
||||
IB_DESIGNABLE
|
||||
@interface TGPDiscreteSlider : TGPDiscreteSlider7
|
||||
|
||||
@property (nonatomic) IBInspectable int tickStyle;
|
||||
@property (nonatomic) IBInspectable CGSize tickSize;
|
||||
@property (nonatomic) IBInspectable int tickCount;
|
||||
@property (nonatomic) IBInspectable NSString * tickImage;
|
||||
|
||||
@property (nonatomic) IBInspectable int trackStyle;
|
||||
@property (nonatomic) IBInspectable CGFloat trackThickness;
|
||||
@property (nonatomic) IBInspectable NSString * trackImage;
|
||||
@property (nonatomic) IBInspectable UIColor * minimumTrackTintColor;
|
||||
@property (nonatomic) IBInspectable UIColor * maximumTrackTintColor;
|
||||
|
||||
@property (nonatomic) IBInspectable int thumbStyle;
|
||||
@property (nonatomic) IBInspectable CGSize thumbSize;
|
||||
@property (nonatomic) IBInspectable UIColor * thumbTintColor;
|
||||
@property (nonatomic) IBInspectable CGFloat thumbSRadius;
|
||||
@property (nonatomic) IBInspectable CGSize thumbSOffset;
|
||||
@property (nonatomic) IBInspectable NSString * thumbImage;
|
||||
|
||||
// AKA: UISlider value (as CGFloat for compatibility with UISlider API, but expected to contain integers)
|
||||
@property (nonatomic) IBInspectable CGFloat minimumValue;
|
||||
@property (nonatomic) IBInspectable CGFloat value;
|
||||
|
||||
@property (nonatomic) IBInspectable int incrementValue;
|
||||
|
||||
@end
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
// @file: TGPDiscreteSlider.m
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPDiscreteSlider.h"
|
||||
|
||||
@implementation TGPDiscreteSlider
|
||||
|
||||
@dynamic tickStyle;
|
||||
@dynamic tickSize;
|
||||
@dynamic tickCount;
|
||||
@dynamic tickImage;
|
||||
@dynamic trackStyle;
|
||||
@dynamic trackThickness;
|
||||
@dynamic trackImage;
|
||||
@dynamic minimumTrackTintColor;
|
||||
@dynamic maximumTrackTintColor;
|
||||
@dynamic thumbStyle;
|
||||
@dynamic thumbSize;
|
||||
@dynamic thumbTintColor;
|
||||
@dynamic thumbImage;
|
||||
@dynamic minimumValue;
|
||||
@dynamic value;
|
||||
@dynamic incrementValue;
|
||||
|
||||
#pragma mark properties
|
||||
|
||||
- (void)setThumbSRadius:(CGFloat)thumbSRadius {
|
||||
// adapter
|
||||
self.thumbShadowRadius = thumbSRadius;
|
||||
}
|
||||
|
||||
- (void)setThumbSOffset:(CGSize)thumbSOffset {
|
||||
// adapter
|
||||
self.thumbShadowOffset = thumbSOffset;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,742 @@
|
|||
// @file: TGPDiscreteSlider.swift
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import UIKit
|
||||
|
||||
public enum ComponentStyle:Int {
|
||||
case iOS = 0
|
||||
case rectangular
|
||||
case rounded
|
||||
case invisible
|
||||
case image
|
||||
}
|
||||
|
||||
|
||||
// Interface builder hides the IBInspectable for UIControl
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
public class TGPSlider_INTERFACE_BUILDER:UIView {
|
||||
}
|
||||
#else // !TARGET_INTERFACE_BUILDER
|
||||
public class TGPSlider_INTERFACE_BUILDER:UIControl {
|
||||
}
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
|
||||
@IBDesignable
|
||||
public class TGPDiscreteSlider:TGPSlider_INTERFACE_BUILDER {
|
||||
|
||||
@IBInspectable public var tickStyle:Int = ComponentStyle.rectangular.rawValue {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var tickSize:CGSize = CGSize(width:1, height:4) {
|
||||
didSet {
|
||||
tickSize.width = max(0, tickSize.width)
|
||||
tickSize.height = max(0, tickSize.height)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var tickCount:Int = 11 {
|
||||
didSet {
|
||||
tickCount = max(2, tickCount)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var tickImage:String? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var trackStyle:Int = ComponentStyle.iOS.rawValue {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var trackThickness:CGFloat = 2 {
|
||||
didSet {
|
||||
trackThickness = max(0, trackThickness)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var trackImage:String? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var minimumTrackTintColor:UIColor? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var maximumTrackTintColor:UIColor = UIColor(white: 0.71, alpha: 1) {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbStyle:Int = ComponentStyle.iOS.rawValue {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbSize:CGSize = CGSize(width:10, height:10) {
|
||||
didSet {
|
||||
thumbSize.width = max(1, thumbSize.width)
|
||||
thumbSize.height = max(1, thumbSize.height)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbTintColor:UIColor? = nil {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbImage:String? = nil {
|
||||
didSet {
|
||||
// Associate image to layer NSBundle.bundleForClass(class)
|
||||
if let imageName = thumbImage,
|
||||
let image = UIImage(named: imageName) {
|
||||
thumbLayer.contents = image.cgImage
|
||||
}
|
||||
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbShadowRadius:CGFloat = 0 {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var thumbShadowOffset:CGSize = CGSize.zero {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var incrementValue:Int = 1 {
|
||||
didSet {
|
||||
if(0 == incrementValue) {
|
||||
incrementValue = 1; // nonZeroIncrement
|
||||
}
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UISlider substitution
|
||||
// AKA: UISlider value (as CGFloat for compatibility with UISlider API, but expected to contain integers)
|
||||
|
||||
@IBInspectable public var minimumValue:CGFloat {
|
||||
get {
|
||||
return CGFloat(intMinimumValue)
|
||||
}
|
||||
set {
|
||||
intMinimumValue = Int(newValue)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
@IBInspectable public var value:CGFloat {
|
||||
get {
|
||||
return CGFloat(intValue)
|
||||
}
|
||||
set {
|
||||
intValue = Int(newValue)
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: @IBInspectable adapters
|
||||
|
||||
public var tickComponentStyle:ComponentStyle {
|
||||
get {
|
||||
return ComponentStyle(rawValue: tickStyle) ?? .rectangular
|
||||
}
|
||||
set {
|
||||
tickStyle = newValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
public var trackComponentStyle:ComponentStyle {
|
||||
get {
|
||||
return ComponentStyle(rawValue: trackStyle) ?? .iOS
|
||||
}
|
||||
set {
|
||||
trackStyle = newValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
public var thumbComponentStyle:ComponentStyle {
|
||||
get {
|
||||
return ComponentStyle(rawValue: thumbStyle) ?? .iOS
|
||||
}
|
||||
set {
|
||||
thumbStyle = newValue.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
public override var tintColor: UIColor! {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
public override var bounds: CGRect {
|
||||
didSet {
|
||||
layoutTrack()
|
||||
}
|
||||
}
|
||||
|
||||
public var ticksDistance:CGFloat {
|
||||
get {
|
||||
assert(tickCount > 1, "2 ticks minimum \(tickCount)")
|
||||
let segments = CGFloat(max(1, self.tickCount - 1))
|
||||
return trackRectangle.width / segments
|
||||
}
|
||||
set {}
|
||||
}
|
||||
|
||||
public var ticksListener:TGPControlsTicksProtocol? = nil {
|
||||
didSet {
|
||||
ticksListener?.tgpTicksDistanceChanged(ticksDistance: ticksDistance,
|
||||
sender: self)
|
||||
}
|
||||
}
|
||||
|
||||
var intValue:Int = 0
|
||||
var intMinimumValue = -5
|
||||
|
||||
var ticksAbscisses:[CGPoint] = []
|
||||
var thumbAbscisse:CGFloat = 0
|
||||
var thumbLayer = CALayer()
|
||||
var leftTrackLayer = CALayer()
|
||||
var rightTrackLayer = CALayer()
|
||||
var trackLayer = CALayer()
|
||||
var ticksLayer = CALayer()
|
||||
var trackRectangle = CGRect.zero
|
||||
var touchedInside = false
|
||||
|
||||
let iOSThumbShadowRadius:CGFloat = 4
|
||||
let iOSThumbShadowOffset = CGSize(width:0, height:3)
|
||||
|
||||
// MARK: UIControl
|
||||
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
initProperties()
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
initProperties()
|
||||
}
|
||||
|
||||
public override func draw(_ rect: CGRect) {
|
||||
drawTrack()
|
||||
drawTicks()
|
||||
drawThumb()
|
||||
}
|
||||
|
||||
func sendActionsForControlEvents() {
|
||||
// Automatic UIControlEventValueChanged notification
|
||||
if let ticksListener = ticksListener {
|
||||
ticksListener.tgpValueChanged(value: UInt(value))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: TGPDiscreteSlider
|
||||
|
||||
func initProperties() {
|
||||
// Track is a clear clipping layer, and left + right sublayers, which brings in free animation
|
||||
trackLayer.masksToBounds = true
|
||||
trackLayer.backgroundColor = UIColor.clear.cgColor
|
||||
layer.addSublayer(trackLayer)
|
||||
if let backgroundColor = tintColor {
|
||||
leftTrackLayer.backgroundColor = backgroundColor.cgColor
|
||||
}
|
||||
trackLayer.addSublayer(leftTrackLayer)
|
||||
rightTrackLayer.backgroundColor = maximumTrackTintColor.cgColor
|
||||
trackLayer.addSublayer(rightTrackLayer)
|
||||
|
||||
// Ticks in between track and thumb
|
||||
layer.addSublayer(ticksLayer)
|
||||
|
||||
// The thumb is its own CALayer, which brings in free animation
|
||||
layer.addSublayer(thumbLayer)
|
||||
|
||||
isMultipleTouchEnabled = false
|
||||
layoutTrack()
|
||||
}
|
||||
|
||||
func drawTicks() {
|
||||
ticksLayer.frame = bounds
|
||||
if let backgroundColor = tintColor {
|
||||
ticksLayer.backgroundColor = backgroundColor.cgColor
|
||||
}
|
||||
|
||||
let path = UIBezierPath()
|
||||
|
||||
switch tickComponentStyle {
|
||||
case .rounded:
|
||||
fallthrough
|
||||
|
||||
case .rectangular:
|
||||
fallthrough
|
||||
|
||||
case .image:
|
||||
for originPoint in ticksAbscisses {
|
||||
let rectangle = CGRect(x: originPoint.x-(tickSize.width/2),
|
||||
y: originPoint.y-(tickSize.height/2),
|
||||
width: tickSize.width,
|
||||
height: tickSize.height)
|
||||
switch tickComponentStyle {
|
||||
case .rounded:
|
||||
path.append(UIBezierPath(roundedRect: rectangle,
|
||||
cornerRadius: rectangle.height/2))
|
||||
|
||||
case .rectangular:
|
||||
path.append(UIBezierPath(rect: rectangle))
|
||||
|
||||
case .image:
|
||||
// Draw image if exists
|
||||
if let tickImage = tickImage,
|
||||
let image = UIImage(named: tickImage),
|
||||
let cgImage = image.cgImage,
|
||||
let ctx = UIGraphicsGetCurrentContext() {
|
||||
let centered = CGRect(x: rectangle.origin.x + (rectangle.width/2) - (image.size.width/2),
|
||||
y: rectangle.origin.y + (rectangle.height/2) - (image.size.height/2),
|
||||
width: image.size.width,
|
||||
height: image.size.height)
|
||||
ctx.draw(cgImage, in: centered)
|
||||
}
|
||||
|
||||
case .invisible:
|
||||
fallthrough
|
||||
|
||||
case .iOS:
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
assert(false)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
case .invisible:
|
||||
fallthrough
|
||||
|
||||
case .iOS:
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
// Nothing to draw
|
||||
break
|
||||
}
|
||||
|
||||
let maskLayer = CAShapeLayer()
|
||||
maskLayer.frame = trackLayer.bounds
|
||||
maskLayer.path = path.cgPath
|
||||
ticksLayer.mask = maskLayer
|
||||
}
|
||||
|
||||
func drawTrack() {
|
||||
switch(trackComponentStyle) {
|
||||
case .rectangular:
|
||||
trackLayer.frame = trackRectangle
|
||||
trackLayer.cornerRadius = 0.0
|
||||
|
||||
case .invisible:
|
||||
trackLayer.frame = CGRect.zero
|
||||
|
||||
case .image:
|
||||
trackLayer.frame = CGRect.zero
|
||||
|
||||
// Draw image if exists
|
||||
if let trackImage = trackImage,
|
||||
let image = UIImage(named: trackImage),
|
||||
let cgImage = image.cgImage,
|
||||
let ctx = UIGraphicsGetCurrentContext() {
|
||||
let centered = CGRect(x: (frame.width/2) - (image.size.width/2),
|
||||
y: (frame.height/2) - (image.size.height/2),
|
||||
width: image.size.width,
|
||||
height: image.size.height)
|
||||
ctx.draw(cgImage, in: centered)
|
||||
}
|
||||
|
||||
case .rounded:
|
||||
fallthrough
|
||||
|
||||
case .iOS:
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
trackLayer.frame = trackRectangle
|
||||
trackLayer.cornerRadius = trackRectangle.height/2
|
||||
break
|
||||
}
|
||||
|
||||
leftTrackLayer.frame = {
|
||||
var frame = trackLayer.bounds
|
||||
frame.size.width = thumbAbscisse - trackRectangle.minX
|
||||
return frame
|
||||
}()
|
||||
|
||||
if let backgroundColor = minimumTrackTintColor ?? tintColor {
|
||||
leftTrackLayer.backgroundColor = backgroundColor.cgColor
|
||||
}
|
||||
|
||||
rightTrackLayer.frame = {
|
||||
var frame = trackLayer.bounds
|
||||
frame.size.width = trackRectangle.width - leftTrackLayer.frame.width
|
||||
frame.origin.x = leftTrackLayer.frame.maxX
|
||||
return frame
|
||||
}()
|
||||
rightTrackLayer.backgroundColor = maximumTrackTintColor.cgColor
|
||||
}
|
||||
|
||||
func drawThumb() {
|
||||
if( value >= minimumValue) { // Feature: hide the thumb when below range
|
||||
|
||||
let thumbSizeForStyle = thumbSizeIncludingShadow()
|
||||
let thumbWidth = thumbSizeForStyle.width
|
||||
let thumbHeight = thumbSizeForStyle.height
|
||||
let rectangle = CGRect(x:thumbAbscisse - (thumbWidth / 2),
|
||||
y: (frame.height - thumbHeight)/2,
|
||||
width: thumbWidth,
|
||||
height: thumbHeight)
|
||||
|
||||
let shadowRadius = (thumbComponentStyle == .iOS) ? iOSThumbShadowRadius : thumbShadowRadius
|
||||
let shadowOffset = (thumbComponentStyle == .iOS) ? iOSThumbShadowOffset : thumbShadowOffset
|
||||
|
||||
thumbLayer.frame = ((shadowRadius != 0.0) // Ignore offset if there is no shadow
|
||||
? rectangle.insetBy(dx: shadowRadius + shadowOffset.width,
|
||||
dy: shadowRadius + shadowOffset.height)
|
||||
: rectangle.insetBy(dx: shadowRadius,
|
||||
dy: shadowRadius))
|
||||
|
||||
switch thumbComponentStyle {
|
||||
case .rounded: // A rounded thumb is circular
|
||||
thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.lightGray).cgColor
|
||||
thumbLayer.borderColor = UIColor.clear.cgColor
|
||||
thumbLayer.borderWidth = 0.0
|
||||
thumbLayer.cornerRadius = thumbLayer.frame.width/2
|
||||
thumbLayer.allowsEdgeAntialiasing = true
|
||||
|
||||
case .image:
|
||||
// image is set using layer.contents
|
||||
thumbLayer.backgroundColor = UIColor.clear.cgColor
|
||||
thumbLayer.borderColor = UIColor.clear.cgColor
|
||||
thumbLayer.borderWidth = 0.0
|
||||
thumbLayer.cornerRadius = 0.0
|
||||
thumbLayer.allowsEdgeAntialiasing = false
|
||||
|
||||
case .rectangular:
|
||||
thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.lightGray).cgColor
|
||||
thumbLayer.borderColor = UIColor.clear.cgColor
|
||||
thumbLayer.borderWidth = 0.0
|
||||
thumbLayer.cornerRadius = 0.0
|
||||
thumbLayer.allowsEdgeAntialiasing = false
|
||||
|
||||
case .invisible:
|
||||
thumbLayer.backgroundColor = UIColor.clear.cgColor
|
||||
thumbLayer.cornerRadius = 0.0
|
||||
|
||||
case .iOS:
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
thumbLayer.backgroundColor = (thumbTintColor ?? UIColor.white).cgColor
|
||||
|
||||
// Only default iOS thumb has a border
|
||||
if nil == thumbTintColor {
|
||||
let borderColor = UIColor(white:0.5, alpha: 1)
|
||||
thumbLayer.borderColor = borderColor.cgColor
|
||||
thumbLayer.borderWidth = 0.25
|
||||
} else {
|
||||
thumbLayer.borderWidth = 0
|
||||
}
|
||||
thumbLayer.cornerRadius = thumbLayer.frame.width/2
|
||||
thumbLayer.allowsEdgeAntialiasing = true
|
||||
break
|
||||
}
|
||||
|
||||
// Shadow
|
||||
if(shadowRadius != 0.0) {
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
thumbLayer.shadowOffset = CGSize(width: shadowOffset.width,
|
||||
height: -shadowOffset.height)
|
||||
#else // !TARGET_INTERFACE_BUILDER
|
||||
thumbLayer.shadowOffset = shadowOffset
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
|
||||
thumbLayer.shadowRadius = shadowRadius
|
||||
thumbLayer.shadowColor = UIColor.black.cgColor
|
||||
thumbLayer.shadowOpacity = 0.15
|
||||
} else {
|
||||
thumbLayer.shadowRadius = 0.0
|
||||
thumbLayer.shadowOffset = CGSize.zero
|
||||
thumbLayer.shadowColor = UIColor.clear.cgColor
|
||||
thumbLayer.shadowOpacity = 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func layoutTrack() {
|
||||
assert(tickCount > 1, "2 ticks minimum \(tickCount)")
|
||||
let segments = max(1, tickCount - 1)
|
||||
let thumbWidth = thumbSizeIncludingShadow().width
|
||||
|
||||
// Calculate the track ticks positions
|
||||
let trackHeight = (.iOS == trackComponentStyle) ? 2 : trackThickness
|
||||
var trackSize = CGSize(width: frame.width - thumbWidth,
|
||||
height: trackHeight)
|
||||
if(.image == trackComponentStyle) {
|
||||
if let trackImage = trackImage,
|
||||
let image = UIImage(named: trackImage) {
|
||||
trackSize.width = image.size.width - thumbWidth
|
||||
}
|
||||
}
|
||||
|
||||
trackRectangle = CGRect(x: (frame.width - trackSize.width)/2,
|
||||
y: (frame.height - trackSize.height)/2,
|
||||
width: trackSize.width,
|
||||
height: trackSize.height)
|
||||
let trackY = frame.height / 2
|
||||
ticksAbscisses = []
|
||||
for iterate in 0 ..< segments {
|
||||
let ratio = Double(iterate) / Double(segments)
|
||||
let originX = trackRectangle.origin.x + (CGFloat)(trackSize.width * CGFloat(ratio))
|
||||
ticksAbscisses.append(CGPoint(x: originX, y: trackY))
|
||||
}
|
||||
layoutThumb()
|
||||
|
||||
// If we have a TGPDiscreteSliderTicksListener (such as TGPCamelLabels), broadcast new spacing
|
||||
ticksListener?.tgpTicksDistanceChanged(ticksDistance:ticksDistance, sender:self)
|
||||
setNeedsDisplay()
|
||||
}
|
||||
|
||||
func layoutThumb() {
|
||||
assert(tickCount > 1, "2 ticks minimum \(tickCount)")
|
||||
let segments = max(1, tickCount - 1)
|
||||
|
||||
// Calculate the thumb position
|
||||
let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue)
|
||||
var thumbRatio = Double(value - minimumValue) / Double(segments * nonZeroIncrement)
|
||||
thumbRatio = max(0.0, min(thumbRatio, 1.0)) // Normalized
|
||||
thumbAbscisse = trackRectangle.origin.x + (CGFloat)(trackRectangle.width * CGFloat(thumbRatio))
|
||||
}
|
||||
|
||||
func thumbSizeIncludingShadow() -> CGSize {
|
||||
switch thumbComponentStyle {
|
||||
case .invisible:
|
||||
fallthrough
|
||||
|
||||
case .rectangular:
|
||||
fallthrough
|
||||
|
||||
case .rounded:
|
||||
return ((thumbShadowRadius != 0.0)
|
||||
? CGSize(width:thumbSize.width
|
||||
+ (thumbShadowRadius * 2)
|
||||
+ (thumbShadowOffset.width * 2),
|
||||
height: thumbSize.height
|
||||
+ (thumbShadowRadius * 2)
|
||||
+ (thumbShadowOffset.height * 2))
|
||||
: thumbSize)
|
||||
|
||||
case .iOS:
|
||||
return CGSize(width: 28.0
|
||||
+ (iOSThumbShadowRadius * 2)
|
||||
+ (iOSThumbShadowOffset.width * 2),
|
||||
height: 28.0
|
||||
+ (iOSThumbShadowRadius * 2)
|
||||
+ (iOSThumbShadowOffset.height * 2))
|
||||
|
||||
case .image:
|
||||
if let thumbImage = thumbImage,
|
||||
let image = UIImage(named: thumbImage) {
|
||||
return image.size
|
||||
}
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
return CGSize(width: 33, height: 33)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: UIResponder
|
||||
public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
touchedInside = true
|
||||
|
||||
touchDown(touches, animationDuration: 0.1)
|
||||
sendActionForControlEvent(controlEvent: .valueChanged, with: event)
|
||||
sendActionForControlEvent(controlEvent: .touchDown, with:event)
|
||||
|
||||
if let touch = touches.first {
|
||||
if touch.tapCount > 1 {
|
||||
sendActionForControlEvent(controlEvent: .touchDownRepeat, with: event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
touchDown(touches, animationDuration:0)
|
||||
|
||||
let inside = touchesAreInside(touches)
|
||||
sendActionForControlEvent(controlEvent: .valueChanged, with: event)
|
||||
|
||||
if inside != touchedInside { // Crossing boundary
|
||||
sendActionForControlEvent(controlEvent: (inside) ? .touchDragEnter : .touchDragExit,
|
||||
with: event)
|
||||
touchedInside = inside
|
||||
}
|
||||
// Drag
|
||||
sendActionForControlEvent(controlEvent: (inside) ? .touchDragInside : .touchDragOutside,
|
||||
with: event)
|
||||
}
|
||||
|
||||
public override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
touchUp(touches)
|
||||
|
||||
sendActionForControlEvent(controlEvent: .valueChanged, with: event)
|
||||
sendActionForControlEvent(controlEvent: (touchesAreInside(touches)) ? .touchUpInside : .touchUpOutside,
|
||||
with: event)
|
||||
}
|
||||
|
||||
public override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
touchUp(touches)
|
||||
|
||||
sendActionForControlEvent(controlEvent: .valueChanged, with:event)
|
||||
sendActionForControlEvent(controlEvent: .touchCancel, with:event)
|
||||
}
|
||||
|
||||
|
||||
// MARK: Touches
|
||||
|
||||
func touchDown(_ touches: Set<UITouch>, animationDuration duration:TimeInterval) {
|
||||
if let touch = touches.first {
|
||||
let location = touch.location(in: touch.view)
|
||||
moveThumbTo(abscisse: location.x, animationDuration: duration)
|
||||
}
|
||||
}
|
||||
|
||||
func touchUp(_ touches: Set<UITouch>) {
|
||||
if let touch = touches.first {
|
||||
let location = touch.location(in: touch.view)
|
||||
let tick = pickTickFromSliderPosition(abscisse: location.x)
|
||||
moveThumbToTick(tick: tick)
|
||||
}
|
||||
}
|
||||
|
||||
func touchesAreInside(_ touches: Set<UITouch>) -> Bool {
|
||||
var inside = false
|
||||
if let touch = touches.first {
|
||||
let location = touch.location(in: touch.view)
|
||||
if let bounds = touch.view?.bounds {
|
||||
inside = bounds.contains(location)
|
||||
}
|
||||
}
|
||||
return inside
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
func moveThumbToTick(tick: UInt) {
|
||||
let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue)
|
||||
let intValue = Int(minimumValue) + (Int(tick) * nonZeroIncrement)
|
||||
if intValue != self.intValue {
|
||||
self.intValue = intValue
|
||||
sendActionsForControlEvents()
|
||||
}
|
||||
|
||||
layoutThumb()
|
||||
setNeedsDisplay()
|
||||
}
|
||||
|
||||
func moveThumbTo(abscisse:CGFloat, animationDuration duration:TimeInterval) {
|
||||
let leftMost = trackRectangle.minX
|
||||
let rightMost = trackRectangle.maxX
|
||||
|
||||
thumbAbscisse = max(leftMost, min(abscisse, rightMost))
|
||||
CATransaction.setAnimationDuration(duration)
|
||||
|
||||
let tick = pickTickFromSliderPosition(abscisse: thumbAbscisse)
|
||||
let nonZeroIncrement = ((0 == incrementValue) ? 1 : incrementValue)
|
||||
let intValue = Int(minimumValue) + (Int(tick) * nonZeroIncrement)
|
||||
if intValue != self.intValue {
|
||||
self.intValue = intValue
|
||||
sendActionsForControlEvents()
|
||||
}
|
||||
|
||||
setNeedsDisplay()
|
||||
}
|
||||
|
||||
func pickTickFromSliderPosition(abscisse: CGFloat) -> UInt {
|
||||
let leftMost = trackRectangle.minX
|
||||
let rightMost = trackRectangle.maxX
|
||||
let clampedAbscisse = max(leftMost, min(abscisse, rightMost))
|
||||
let ratio = Double(clampedAbscisse - leftMost) / Double(rightMost - leftMost)
|
||||
let segments = max(1, tickCount - 1)
|
||||
return UInt(round( Double(segments) * ratio))
|
||||
}
|
||||
|
||||
func sendActionForControlEvent(controlEvent:UIControlEvents, with event:UIEvent?) {
|
||||
for target in allTargets {
|
||||
if let caActions = actions(forTarget: target, forControlEvent: controlEvent) {
|
||||
for actionName in caActions {
|
||||
sendAction(NSSelectorFromString(actionName), to: target, for: event)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
// MARK: TARGET_INTERFACE_BUILDER stub
|
||||
// Interface builder hides the IBInspectable for UIControl
|
||||
|
||||
let allTargets: Set<AnyHashable> = Set()
|
||||
func addTarget(_ target: Any?, action: Selector, for controlEvents: UIControlEvents) {}
|
||||
func actions(forTarget target: Any?, forControlEvent controlEvent: UIControlEvents) -> [String]? { return nil }
|
||||
func sendAction(_ action: Selector, to target: Any?, for event: UIEvent?) {}
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
// @file: TGPDiscreteSlider7.h
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created July 4th, 2014 (Independence Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TGPControlsTicksProtocol.h"
|
||||
|
||||
@interface TGPDiscreteSlider7 :
|
||||
|
||||
// Interface builder hides the IBInspectable for UIControl
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
UIView
|
||||
#else // !TARGET_INTERFACE_BUILDER
|
||||
UIControl
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
|
||||
typedef NS_ENUM(int, ComponentStyle) {
|
||||
ComponentStyleIOS = 0,
|
||||
ComponentStyleRectangular,
|
||||
ComponentStyleRounded,
|
||||
ComponentStyleInvisible,
|
||||
ComponentStyleImage
|
||||
};
|
||||
|
||||
@property (nonatomic, assign) ComponentStyle tickStyle;
|
||||
@property (nonatomic, assign) CGSize tickSize;
|
||||
@property (nonatomic, assign) int tickCount;
|
||||
@property (nonatomic, readonly) CGFloat ticksDistance;
|
||||
@property (nonatomic, strong) NSString * tickImage;
|
||||
|
||||
|
||||
@property (nonatomic, assign) ComponentStyle trackStyle;
|
||||
@property (nonatomic, assign) CGFloat trackThickness;
|
||||
@property (nonatomic, strong) NSString * trackImage;
|
||||
@property (nonatomic, strong) UIColor * minimumTrackTintColor;
|
||||
@property (nonatomic, strong) UIColor * maximumTrackTintColor;
|
||||
|
||||
@property (nonatomic, assign) ComponentStyle thumbStyle;
|
||||
@property (nonatomic, assign) CGSize thumbSize;
|
||||
@property (nonatomic, strong) UIColor * thumbTintColor;
|
||||
@property (nonatomic, assign) CGFloat thumbShadowRadius;
|
||||
@property (nonatomic, assign) CGSize thumbShadowOffset;
|
||||
@property (nonatomic, strong) NSString * thumbImage;
|
||||
|
||||
@property (nonatomic, weak) NSObject<TGPControlsTicksProtocol> * ticksListener;
|
||||
|
||||
// AKA: UISlider value (as CGFloat for compatibility with UISlider API, but expected to contain integers)
|
||||
@property (nonatomic, assign) CGFloat minimumValue;
|
||||
@property (nonatomic, assign) CGFloat value;
|
||||
|
||||
@property (nonatomic, assign) int incrementValue;
|
||||
|
||||
@end
|
||||
|
|
@ -1,726 +0,0 @@
|
|||
// @file: TGPDiscreteSlider7.m
|
||||
// @project: TGPControls
|
||||
//
|
||||
// @history: Created July 4th, 2014 (Independence Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TGPDiscreteSlider7.h"
|
||||
|
||||
static CGFloat iOSThumbShadowRadius = 4.0;
|
||||
static CGSize iosThumbShadowOffset = (CGSize){0, 3};
|
||||
|
||||
@interface TGPDiscreteSlider7 () {
|
||||
int _intValue;
|
||||
int _intMinimumValue;
|
||||
}
|
||||
@property (nonatomic) NSMutableArray * ticksAbscisses;
|
||||
@property (nonatomic, assign) CGFloat thumbAbscisse;
|
||||
@property (nonatomic) CALayer * thumbLayer;
|
||||
@property (nonatomic) CALayer * leftTrackLayer;
|
||||
@property (nonatomic) CALayer * rightTrackLayer;
|
||||
@property (nonatomic) CALayer * trackLayer;
|
||||
@property (nonatomic) CALayer * ticksLayer;
|
||||
@property (nonatomic) CGRect trackRectangle;
|
||||
@property (nonatomic) BOOL touchedInside;
|
||||
@end
|
||||
|
||||
@implementation TGPDiscreteSlider7
|
||||
|
||||
#pragma mark properties
|
||||
|
||||
- (void)setTickStyle:(ComponentStyle)tickStyle {
|
||||
_tickStyle = tickStyle;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTickSize:(CGSize)tickSize {
|
||||
_tickSize.width = MAX(0, tickSize.width);
|
||||
_tickSize.height = MAX(0, tickSize.height);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTickCount:(int)tickCount {
|
||||
_tickCount = MAX(2, tickCount);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (CGFloat)ticksDistance {
|
||||
NSAssert1(self.tickCount > 1, @"2 ticks minimum %d", self.tickCount);
|
||||
const unsigned int segments = MAX(1, self.tickCount - 1);
|
||||
return (self.trackRectangle.size.width / segments);
|
||||
}
|
||||
|
||||
- (void)setTickImage:(NSString *)tickImage {
|
||||
_tickImage = tickImage;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTintColor:(UIColor *)tintColor {
|
||||
[super setTintColor:tintColor];
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTrackStyle:(ComponentStyle)trackStyle {
|
||||
_trackStyle = trackStyle;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTrackThickness:(CGFloat)trackThickness {
|
||||
_trackThickness = MAX(0, trackThickness);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTrackImage:(NSString *)trackImage {
|
||||
_trackImage = trackImage;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setMinimumTrackTintColor:(UIColor *)minimumTrackTintColor {
|
||||
_minimumTrackTintColor = minimumTrackTintColor;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setMaximumTrackTintColor:(UIColor *)maximumTrackTintColor {
|
||||
_maximumTrackTintColor = maximumTrackTintColor;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbStyle:(ComponentStyle)thumbStyle {
|
||||
_thumbStyle = thumbStyle;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbSize:(CGSize)thumbSize {
|
||||
_thumbSize.width = MAX(1, thumbSize.width);
|
||||
_thumbSize.height = MAX(1, thumbSize.height);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbTintColor:(UIColor *)thumbTintColor {
|
||||
_thumbTintColor = thumbTintColor;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbImage:(NSString *)thumbImage {
|
||||
_thumbImage = thumbImage;
|
||||
|
||||
// Associate image to layer
|
||||
NSString * imageName = self.thumbImage;
|
||||
if(imageName.length > 0) {
|
||||
UIImage * image = [UIImage imageNamed:imageName]; //[NSBundle bundleForClass:[self class]]
|
||||
self.thumbLayer.contents = (id)image.CGImage;
|
||||
}
|
||||
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbShadowRadius:(CGFloat)thumbShadowRadius {
|
||||
_thumbShadowRadius = thumbShadowRadius;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setThumbShadowOffset:(CGSize)thumbShadowOffset {
|
||||
_thumbShadowOffset = thumbShadowOffset;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)setTicksListener:(NSObject<TGPControlsTicksProtocol> *)ticksListener {
|
||||
_ticksListener = ticksListener;
|
||||
[self.ticksListener tgpTicksDistanceChanged:self.ticksDistance sender:self];
|
||||
}
|
||||
|
||||
- (void)setIncrementValue:(int)incrementValue {
|
||||
_incrementValue = incrementValue;
|
||||
if(0 == incrementValue) {
|
||||
_incrementValue = 1; // nonZeroIncrement
|
||||
}
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
// AKA: UISlider value (as CGFloat for compatibility with UISlider API, but expected to contain integers)
|
||||
- (void)setMinimumValue:(CGFloat)minimumValue {
|
||||
_intMinimumValue = minimumValue;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (CGFloat)minimumValue {
|
||||
return _intMinimumValue; // calculated property, with a float-to-int adapter
|
||||
}
|
||||
|
||||
- (void)setValue:(CGFloat)value {
|
||||
const unsigned int nonZeroIncrement = ((0 == _incrementValue) ? 1 : _incrementValue);
|
||||
const int rootValue = ((value - self.minimumValue) / nonZeroIncrement);
|
||||
_intValue = self.minimumValue + (int)(rootValue * nonZeroIncrement);
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (CGFloat)value {
|
||||
return _intValue; // calculated property, with a float-to-int adapter
|
||||
}
|
||||
|
||||
// When bounds change, recalculate layout
|
||||
- (void)setBounds:(CGRect)bounds
|
||||
{
|
||||
[super setBounds:bounds];
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
#pragma mark UIControl
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self != nil) {
|
||||
[self initProperties];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if(self != nil) {
|
||||
[self initProperties];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
[self drawTrack];
|
||||
[self drawTicks];
|
||||
[self drawThumb];
|
||||
}
|
||||
|
||||
- (void)sendActionsForControlEvents {
|
||||
// Automatic UIControlEventValueChanged notification
|
||||
if([self.ticksListener respondsToSelector:@selector(tgpValueChanged:)]) {
|
||||
[self.ticksListener tgpValueChanged:self.value];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark TGPDiscreteSlider7
|
||||
|
||||
- (void)initProperties {
|
||||
_tickStyle = ComponentStyleRectangular;
|
||||
_tickSize = (CGSize) {1.0, 4.0};
|
||||
_tickCount = 11;
|
||||
_trackStyle = ComponentStyleIOS;
|
||||
_trackThickness = 2.0;
|
||||
_minimumTrackTintColor = nil;
|
||||
_maximumTrackTintColor = [UIColor colorWithWhite:0.71 alpha:1];
|
||||
_thumbStyle = ComponentStyleIOS;
|
||||
_thumbSize = (CGSize) {10.0, 10.0};
|
||||
_thumbTintColor = nil;
|
||||
_thumbShadowRadius = 0.0;
|
||||
_thumbShadowOffset = CGSizeZero;
|
||||
_intMinimumValue = -5;
|
||||
_incrementValue = 1;
|
||||
_intValue = 0;
|
||||
_ticksAbscisses = [NSMutableArray array];
|
||||
_thumbAbscisse = 0.0;
|
||||
_trackRectangle = CGRectZero;
|
||||
|
||||
// Track is a clear clipping layer, and left + right sublayers, which brings in free animation
|
||||
_trackLayer = [CALayer layer];
|
||||
_trackLayer.masksToBounds = YES;
|
||||
_trackLayer.backgroundColor = [[UIColor clearColor] CGColor];
|
||||
[self.layer addSublayer:self.trackLayer];
|
||||
_leftTrackLayer = [CALayer layer];
|
||||
_leftTrackLayer.backgroundColor = [self.tintColor CGColor];
|
||||
[self.trackLayer addSublayer:self.leftTrackLayer];
|
||||
_rightTrackLayer = [CALayer layer];
|
||||
_rightTrackLayer.backgroundColor = [self.maximumTrackTintColor CGColor];
|
||||
[self.trackLayer addSublayer:self.rightTrackLayer];
|
||||
|
||||
// Ticks in between track and thumb
|
||||
_ticksLayer = [CALayer layer];
|
||||
[self.layer addSublayer:self.ticksLayer];
|
||||
|
||||
// The thumb is its own CALayer, which brings in free animation
|
||||
_thumbLayer = [CALayer layer];
|
||||
[self.layer addSublayer:self.thumbLayer];
|
||||
|
||||
self.multipleTouchEnabled = NO;
|
||||
[self layoutTrack];
|
||||
}
|
||||
|
||||
- (void)drawTicks {
|
||||
self.ticksLayer.frame = self.bounds;
|
||||
self.ticksLayer.backgroundColor = [self.tintColor CGColor];
|
||||
|
||||
UIBezierPath *path = [UIBezierPath bezierPath];
|
||||
|
||||
switch (self.tickStyle) {
|
||||
case ComponentStyleRounded:
|
||||
case ComponentStyleRectangular:
|
||||
case ComponentStyleImage: {
|
||||
NSAssert(nil != self.ticksAbscisses, @"ticksAbscisses");
|
||||
if(nil != self.ticksAbscisses) {
|
||||
|
||||
for(NSValue * originValue in self.ticksAbscisses) {
|
||||
CGPoint originPoint = [originValue CGPointValue];
|
||||
CGRect rectangle = CGRectMake(originPoint.x-(self.tickSize.width/2),
|
||||
originPoint.y-(self.tickSize.height/2),
|
||||
self.tickSize.width, self.tickSize.height);
|
||||
switch(self.tickStyle) {
|
||||
case ComponentStyleRounded: {
|
||||
[path appendPath:[UIBezierPath bezierPathWithRoundedRect:rectangle
|
||||
cornerRadius:rectangle.size.height/2]];
|
||||
break;
|
||||
}
|
||||
|
||||
case ComponentStyleRectangular:
|
||||
[path appendPath:[UIBezierPath bezierPathWithRect:rectangle]];
|
||||
break;
|
||||
|
||||
case ComponentStyleImage: {
|
||||
// Draw image if exists
|
||||
NSString * imageName = self.tickImage;
|
||||
if(imageName.length > 0) {
|
||||
UIImage * image = [UIImage imageNamed:imageName]; //[NSBundle bundleForClass:[self class]]
|
||||
if(image) {
|
||||
CGRect centered = CGRectMake(rectangle.origin.x + (rectangle.size.width/2) - (image.size.width/2),
|
||||
rectangle.origin.y + (rectangle.size.height/2) - (image.size.height/2),
|
||||
image.size.width,
|
||||
image.size.height);
|
||||
const CGContextRef ctx = UIGraphicsGetCurrentContext();
|
||||
CGContextDrawImage(ctx, centered, image.CGImage);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ComponentStyleInvisible:
|
||||
case ComponentStyleIOS:
|
||||
default:
|
||||
NSAssert(FALSE, @"ComponentStyleInvisible, ComponentStyleIOS, default");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ComponentStyleInvisible:
|
||||
case ComponentStyleIOS:
|
||||
default:
|
||||
// Nothing to draw
|
||||
break;
|
||||
}
|
||||
|
||||
CAShapeLayer *maskLayer = [CAShapeLayer layer];
|
||||
maskLayer.frame = self.trackLayer.bounds;
|
||||
maskLayer.path = path.CGPath;
|
||||
self.ticksLayer.mask = maskLayer;
|
||||
}
|
||||
|
||||
- (void)drawTrack {
|
||||
switch(self.trackStyle) {
|
||||
case ComponentStyleRectangular:
|
||||
self.trackLayer.frame = self.trackRectangle;
|
||||
self.trackLayer.cornerRadius = 0.0;
|
||||
break;
|
||||
|
||||
case ComponentStyleInvisible:
|
||||
self.trackLayer.frame = CGRectZero;
|
||||
break;
|
||||
|
||||
case ComponentStyleImage: {
|
||||
self.trackLayer.frame = CGRectZero;
|
||||
|
||||
// Draw image if exists
|
||||
NSString * imageName = self.trackImage;
|
||||
if(imageName.length > 0) {
|
||||
UIImage * image = [UIImage imageNamed:imageName]; //[NSBundle bundleForClass:[self class]]
|
||||
if(image) {
|
||||
CGRect centered = CGRectMake((self.frame.size.width/2) - (image.size.width/2),
|
||||
(self.frame.size.height/2) - (image.size.height/2),
|
||||
image.size.width,
|
||||
image.size.height);
|
||||
const CGContextRef ctx = UIGraphicsGetCurrentContext();
|
||||
CGContextDrawImage(ctx, centered, image.CGImage);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ComponentStyleRounded:
|
||||
case ComponentStyleIOS:
|
||||
default:
|
||||
self.trackLayer.frame = self.trackRectangle;
|
||||
self.trackLayer.cornerRadius = CGRectGetHeight(self.trackRectangle)/2.0;
|
||||
break;
|
||||
}
|
||||
|
||||
self.leftTrackLayer.frame = ({
|
||||
CGRect frame = self.trackLayer.bounds;
|
||||
frame.size.width = self.thumbAbscisse - CGRectGetMinX(self.trackRectangle);
|
||||
frame;
|
||||
});
|
||||
self.leftTrackLayer.backgroundColor = ((nil == self.minimumTrackTintColor)
|
||||
? [self.tintColor CGColor]
|
||||
: [self.minimumTrackTintColor CGColor]);
|
||||
|
||||
self.rightTrackLayer.frame = ({
|
||||
CGRect frame = self.trackLayer.bounds;
|
||||
frame.size.width = CGRectGetWidth(self.trackRectangle) - CGRectGetWidth(self.leftTrackLayer.frame);
|
||||
frame.origin.x = CGRectGetMaxX(self.leftTrackLayer.frame);
|
||||
frame;
|
||||
});
|
||||
self.rightTrackLayer.backgroundColor = [self.maximumTrackTintColor CGColor];
|
||||
}
|
||||
|
||||
- (void)drawThumb {
|
||||
if( self.value >= self.minimumValue) { // Feature: hide the thumb when below range
|
||||
|
||||
const CGSize thumbSizeForStyle = [self thumbSizeIncludingShadow];
|
||||
const CGFloat thumbWidth = thumbSizeForStyle.width;
|
||||
const CGFloat thumbHeight = thumbSizeForStyle.height;
|
||||
const CGRect rectangle = CGRectMake(self.thumbAbscisse - (thumbWidth / 2),
|
||||
(self.frame.size.height - thumbHeight)/2,
|
||||
thumbWidth,
|
||||
thumbHeight);
|
||||
|
||||
const CGFloat shadowRadius = ((self.thumbStyle == ComponentStyleIOS)
|
||||
? iOSThumbShadowRadius
|
||||
: self.thumbShadowRadius);
|
||||
const CGSize shadowOffset = ((self.thumbStyle == ComponentStyleIOS)
|
||||
? iosThumbShadowOffset
|
||||
: self.thumbShadowOffset);
|
||||
|
||||
self.thumbLayer.frame = ((shadowRadius != 0.0) // Ignore offset if there is no shadow
|
||||
? CGRectInset(rectangle,
|
||||
shadowRadius + shadowOffset.width,
|
||||
shadowRadius + shadowOffset.height)
|
||||
: CGRectInset(rectangle, shadowRadius, shadowRadius));
|
||||
|
||||
switch(self.thumbStyle) {
|
||||
case ComponentStyleRounded: // A rounded thumb is circular
|
||||
self.thumbLayer.backgroundColor = ((nil == self.thumbTintColor)
|
||||
? [[UIColor lightGrayColor] CGColor]
|
||||
: [self.thumbTintColor CGColor]);
|
||||
self.thumbLayer.borderColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.borderWidth = 0.0;
|
||||
self.thumbLayer.cornerRadius = self.thumbLayer.frame.size.width/2;
|
||||
self.thumbLayer.allowsEdgeAntialiasing = YES;
|
||||
break;
|
||||
|
||||
case ComponentStyleImage: {
|
||||
// image is set using layer.contents
|
||||
self.thumbLayer.backgroundColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.borderColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.borderWidth = 0.0;
|
||||
self.thumbLayer.cornerRadius = 0.0;
|
||||
self.thumbLayer.allowsEdgeAntialiasing = NO;
|
||||
break;
|
||||
}
|
||||
|
||||
case ComponentStyleRectangular:
|
||||
self.thumbLayer.backgroundColor = ((nil == self.thumbTintColor)
|
||||
? [[UIColor lightGrayColor] CGColor]
|
||||
: [self.thumbTintColor CGColor]);
|
||||
self.thumbLayer.borderColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.borderWidth = 0.0;
|
||||
self.thumbLayer.cornerRadius = 0.0;
|
||||
self.thumbLayer.allowsEdgeAntialiasing = NO;
|
||||
break;
|
||||
|
||||
case ComponentStyleInvisible:
|
||||
self.thumbLayer.backgroundColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.cornerRadius = 0.0;
|
||||
break;
|
||||
|
||||
case ComponentStyleIOS:
|
||||
default: {
|
||||
UIColor * backgroundColor = ((nil == self.thumbTintColor)
|
||||
? [UIColor whiteColor]
|
||||
: self.thumbTintColor);
|
||||
self.thumbLayer.backgroundColor = [backgroundColor CGColor];
|
||||
// Only default iOS thumb has a border
|
||||
if(nil == self.thumbTintColor) {
|
||||
const UIColor * borderColor = [UIColor colorWithWhite:0.5 alpha: 1];
|
||||
self.thumbLayer.borderColor = [borderColor CGColor];
|
||||
self.thumbLayer.borderWidth = 0.25;
|
||||
} else {
|
||||
self.thumbLayer.borderWidth = 0;
|
||||
}
|
||||
self.thumbLayer.cornerRadius = self.thumbLayer.frame.size.width/2;
|
||||
self.thumbLayer.allowsEdgeAntialiasing = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Shadow
|
||||
if(shadowRadius != 0.0) {
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
self.thumbLayer.shadowOffset = CGSizeMake(shadowOffset.width, -shadowOffset.height);
|
||||
#else // !TARGET_INTERFACE_BUILDER
|
||||
self.thumbLayer.shadowOffset = shadowOffset;
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
|
||||
self.thumbLayer.shadowRadius = shadowRadius;
|
||||
self.thumbLayer.shadowColor = [[UIColor blackColor] CGColor];
|
||||
self.thumbLayer.shadowOpacity = 0.15;
|
||||
} else {
|
||||
self.thumbLayer.shadowRadius = 0.0;
|
||||
self.thumbLayer.shadowOffset = CGSizeZero;
|
||||
self.thumbLayer.shadowColor = [[UIColor clearColor] CGColor];
|
||||
self.thumbLayer.shadowOpacity = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)layoutTrack {
|
||||
NSAssert1(self.tickCount > 1, @"2 ticks minimum %d", self.tickCount);
|
||||
const unsigned int segments = MAX(1, self.tickCount - 1);
|
||||
const CGFloat thumbWidth = [self thumbSizeIncludingShadow].width;
|
||||
|
||||
// Calculate the track ticks positions
|
||||
const CGFloat trackHeight = ((ComponentStyleIOS == self.trackStyle)
|
||||
? 2.0
|
||||
: self.trackThickness);
|
||||
CGSize trackSize = CGSizeMake(self.frame.size.width - thumbWidth, trackHeight);
|
||||
if(ComponentStyleImage == self.trackStyle) {
|
||||
NSString * imageName = self.trackImage;
|
||||
if(imageName.length > 0) {
|
||||
UIImage * image = [UIImage imageNamed:imageName]; //[NSBundle bundleForClass:[self class]]
|
||||
if(image) {
|
||||
trackSize.width = image.size.width - thumbWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.trackRectangle = CGRectMake((self.frame.size.width - trackSize.width)/2,
|
||||
(self.frame.size.height - trackSize.height)/2,
|
||||
trackSize.width,
|
||||
trackSize.height);
|
||||
const CGFloat trackY = self.frame.size.height / 2;
|
||||
[self.ticksAbscisses removeAllObjects];
|
||||
for( int iterate = 0; iterate <= segments; iterate++) {
|
||||
const double ratio = (double)iterate / (double)segments;
|
||||
const CGFloat originX = self.trackRectangle.origin.x + (CGFloat)(trackSize.width * ratio);
|
||||
[self.ticksAbscisses addObject: [NSValue valueWithCGPoint:CGPointMake(originX, trackY)]];
|
||||
}
|
||||
[self layoutThumb];
|
||||
|
||||
// If we have a TGPDiscreteSliderTicksListener (such as TGPCamelLabels), broadcast new spacing
|
||||
[self.ticksListener tgpTicksDistanceChanged:self.ticksDistance sender:self];
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)layoutThumb {
|
||||
NSAssert1(self.tickCount > 1, @"2 ticks minimum %d", self.tickCount);
|
||||
const unsigned int segments = MAX(1, self.tickCount - 1);
|
||||
|
||||
// Calculate the thumb position
|
||||
const unsigned int nonZeroIncrement = ((0 == self.incrementValue) ? 1 : self.incrementValue);
|
||||
double thumbRatio = (double)(self.value - self.minimumValue) / (double)(segments * nonZeroIncrement);
|
||||
thumbRatio = MAX(0.0, MIN(thumbRatio, 1.0)); // Normalized
|
||||
self.thumbAbscisse = self.trackRectangle.origin.x + (self.trackRectangle.size.width * thumbRatio);
|
||||
}
|
||||
|
||||
- (CGSize)thumbSizeIncludingShadow {
|
||||
switch (self.thumbStyle) {
|
||||
case ComponentStyleInvisible:
|
||||
case ComponentStyleRectangular:
|
||||
case ComponentStyleRounded:
|
||||
return ((self.thumbShadowRadius != 0.0)
|
||||
? CGSizeMake(self.thumbSize.width
|
||||
+ (self.thumbShadowRadius * 2)
|
||||
+ (self.thumbShadowOffset.width * 2),
|
||||
self.thumbSize.height
|
||||
+ (self.thumbShadowRadius * 2)
|
||||
+ (self.thumbShadowOffset.height * 2))
|
||||
: self.thumbSize);
|
||||
|
||||
case ComponentStyleIOS:
|
||||
return CGSizeMake(28.0
|
||||
+ (iOSThumbShadowRadius * 2)
|
||||
+ (iosThumbShadowOffset.width * 2),
|
||||
28.0
|
||||
+ (iOSThumbShadowRadius * 2)
|
||||
+ (iosThumbShadowOffset.height * 2));
|
||||
|
||||
case ComponentStyleImage: {
|
||||
NSString * imageName = self.thumbImage;
|
||||
if (imageName.length > 0) {
|
||||
return [UIImage imageNamed:imageName].size;
|
||||
}
|
||||
// Fall through
|
||||
}
|
||||
|
||||
default:
|
||||
return (CGSize){33.0, 33.0};
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark UIResponder
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
self.touchedInside = YES;
|
||||
|
||||
[self touchDown:touches animationDuration:0.1];
|
||||
[self sendActionForControlEvent:UIControlEventValueChanged forEvent:event];
|
||||
[self sendActionForControlEvent:UIControlEventTouchDown forEvent:event];
|
||||
|
||||
const UITouch * touch = [touches anyObject];
|
||||
if(nil != touch) {
|
||||
if(touch.tapCount > 1) {
|
||||
[self sendActionForControlEvent:UIControlEventTouchDownRepeat forEvent:event];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
[self touchDown:touches animationDuration:0.0];
|
||||
|
||||
BOOL inside = [self touchesAreInside:touches];
|
||||
|
||||
[self sendActionForControlEvent:UIControlEventValueChanged forEvent:event];
|
||||
// Crossing boundary
|
||||
if(inside != self.touchedInside) {
|
||||
[self sendActionForControlEvent:((inside)
|
||||
? UIControlEventTouchDragEnter
|
||||
: UIControlEventTouchDragExit)
|
||||
forEvent:event];
|
||||
self.touchedInside = inside;
|
||||
}
|
||||
// Drag
|
||||
[self sendActionForControlEvent:((inside)
|
||||
? UIControlEventTouchDragInside
|
||||
: UIControlEventTouchDragOutside)
|
||||
forEvent:event];
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
[self touchUp:touches];
|
||||
|
||||
[self sendActionForControlEvent:UIControlEventValueChanged forEvent:event];
|
||||
[self sendActionForControlEvent:(([self touchesAreInside:touches])
|
||||
? UIControlEventTouchUpInside
|
||||
: UIControlEventTouchUpOutside)
|
||||
forEvent:event];
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
[self touchUp:touches];
|
||||
|
||||
[self sendActionForControlEvent:UIControlEventValueChanged forEvent:event];
|
||||
[self sendActionForControlEvent:UIControlEventTouchCancel forEvent:event];
|
||||
}
|
||||
|
||||
#pragma mark Touches
|
||||
|
||||
- (void)touchDown:(NSSet *)touches animationDuration:(NSTimeInterval)duration {
|
||||
const UITouch * touch = [touches anyObject];
|
||||
if(nil != touch) {
|
||||
const CGPoint location = [touch locationInView:touch.view];
|
||||
[self moveThumbTo:location.x animationDuration:duration];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchUp:(NSSet *)touches {
|
||||
const UITouch * touch = [touches anyObject];
|
||||
if(nil != touch) {
|
||||
const CGPoint location = [touch locationInView:touch.view];
|
||||
const unsigned int tick = [self pickTickFromSliderPosition:location.x];
|
||||
[self moveThumbToTick:tick];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)touchesAreInside:(NSSet *)touches {
|
||||
BOOL inside = NO;
|
||||
const UITouch * touch = [touches anyObject];
|
||||
if(nil != touch) {
|
||||
const CGPoint location = [touch locationInView:touch.view];
|
||||
inside = CGRectContainsPoint(touch.view.bounds, location);
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
|
||||
#pragma mark Notifications
|
||||
|
||||
- (void)moveThumbToTick:(unsigned int)tick {
|
||||
const unsigned int nonZeroIncrement = ((0 == self.incrementValue) ? 1 : self.incrementValue);
|
||||
int intValue = self.minimumValue + (tick * nonZeroIncrement);
|
||||
if( intValue != _intValue) {
|
||||
_intValue = intValue;
|
||||
[self sendActionsForControlEvents];
|
||||
}
|
||||
|
||||
[self layoutThumb];
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)moveThumbTo:(CGFloat)abscisse animationDuration:(CFTimeInterval)duration {
|
||||
const CGFloat leftMost = CGRectGetMinX(self.trackRectangle);
|
||||
const CGFloat rightMost = CGRectGetMaxX(self.trackRectangle);
|
||||
|
||||
self.thumbAbscisse = MAX(leftMost, MIN(abscisse, rightMost));
|
||||
[CATransaction setAnimationDuration:duration];
|
||||
|
||||
const unsigned int tick = [self pickTickFromSliderPosition:self.thumbAbscisse];
|
||||
const unsigned int nonZeroIncrement = ((0 == self.incrementValue) ? 1 : self.incrementValue);
|
||||
int intValue = self.minimumValue + (tick * nonZeroIncrement);
|
||||
if( intValue != _intValue) {
|
||||
_intValue = intValue;
|
||||
[self sendActionsForControlEvents];
|
||||
}
|
||||
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (unsigned int)pickTickFromSliderPosition:(CGFloat)abscisse {
|
||||
const CGFloat leftMost = CGRectGetMinX(self.trackRectangle);
|
||||
const CGFloat rightMost = CGRectGetMaxX(self.trackRectangle);
|
||||
const CGFloat clampedAbscisse = MAX(leftMost, MIN(abscisse, rightMost));
|
||||
const double ratio = (double)(clampedAbscisse - leftMost) / (double)(rightMost - leftMost);
|
||||
const unsigned int segments = MAX(1, self.tickCount - 1);
|
||||
return (unsigned int) round( (double)segments * ratio);
|
||||
}
|
||||
|
||||
- (void)sendActionForControlEvent:(UIControlEvents)controlEvent forEvent:(UIEvent *)event {
|
||||
// Interface builder hides the IBInspectable for UIControl
|
||||
#if !TARGET_INTERFACE_BUILDER
|
||||
for (id target in self.allTargets) {
|
||||
NSArray *actions = [self actionsForTarget:target forControlEvent:controlEvent];
|
||||
for (NSString *action in actions) {
|
||||
[self sendAction:NSSelectorFromString(action)
|
||||
to:target
|
||||
forEvent:event];
|
||||
|
||||
}
|
||||
}
|
||||
#endif // !TARGET_INTERFACE_BUILDER
|
||||
}
|
||||
|
||||
#pragma mark - Interface Builder
|
||||
|
||||
#if TARGET_INTERFACE_BUILDER
|
||||
// Interface builder hides the IBInspectable for UIControl
|
||||
- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents {}
|
||||
#endif // TARGET_INTERFACE_BUILDER
|
||||
|
||||
@end
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
# Requires cocoaPods 0.36.0.beta.2 or better.
|
||||
|
||||
platform :ios, '8.0'
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
|
||||
target 'TGPControlsDemo' do
|
||||
|
|
@ -9,7 +7,4 @@ target 'TGPControlsDemo' do
|
|||
pod 'TGPControls'
|
||||
end
|
||||
|
||||
target 'TGPControlsDemoTests' do
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,150 +7,100 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
06B1EA7FFF5C48AB28F48C03 /* Pods_TGPControlsDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D99E06034FFE0CC31C39944E /* Pods_TGPControlsDemo.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
DC0B42111A901E59008D679A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0B42101A901E59008D679A /* AppDelegate.swift */; };
|
||||
DC0B42131A901E59008D679A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0B42121A901E59008D679A /* ViewController.swift */; };
|
||||
DC0B42161A901E59008D679A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC0B42141A901E59008D679A /* Main.storyboard */; };
|
||||
DC0B42181A901E59008D679A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC0B42171A901E59008D679A /* Images.xcassets */; };
|
||||
DC0B421B1A901E59008D679A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC0B42191A901E59008D679A /* LaunchScreen.xib */; };
|
||||
DC0B42271A901E59008D679A /* TGPControlsDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0B42261A901E59008D679A /* TGPControlsDemoTests.swift */; };
|
||||
803A99D2DE444E51D1C80154 /* Pods_TGPControlsDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */; };
|
||||
DC56BDC71E46DEB900AAD0D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC56BDC61E46DEB900AAD0D9 /* AppDelegate.swift */; };
|
||||
DC56BDC91E46DEB900AAD0D9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC56BDC81E46DEB900AAD0D9 /* ViewController.swift */; };
|
||||
DC56BDCC1E46DEB900AAD0D9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC56BDCA1E46DEB900AAD0D9 /* Main.storyboard */; };
|
||||
DC56BDCE1E46DEB900AAD0D9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC56BDCD1E46DEB900AAD0D9 /* Assets.xcassets */; };
|
||||
DC56BDD11E46DEB900AAD0D9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC56BDCF1E46DEB900AAD0D9 /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
DC0B42211A901E59008D679A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = DC0B42031A901E59008D679A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = DC0B420A1A901E59008D679A;
|
||||
remoteInfo = TGPControlsDemo;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
D99E06034FFE0CC31C39944E /* Pods_TGPControlsDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TGPControlsDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC0B420B1A901E59008D679A /* TGPControlsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TGPControlsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC0B420F1A901E59008D679A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DC0B42101A901E59008D679A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
DC0B42121A901E59008D679A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
DC0B42151A901E59008D679A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
DC0B42171A901E59008D679A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
DC0B421A1A901E59008D679A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
DC0B42201A901E59008D679A /* TGPControlsDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TGPControlsDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC0B42251A901E59008D679A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DC0B42261A901E59008D679A /* TGPControlsDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TGPControlsDemoTests.swift; sourceTree = "<group>"; };
|
||||
DC0B42301A901F09008D679A /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
E1E29E38530A3F94DA312C93 /* Pods-TGPControlsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
EA6AEAFB632330729C70C835 /* Pods-TGPControlsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TGPControlsDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC56BDC31E46DEB900AAD0D9 /* TGPControlsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TGPControlsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC56BDC61E46DEB900AAD0D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
DC56BDC81E46DEB900AAD0D9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
DC56BDCB1E46DEB900AAD0D9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
DC56BDCD1E46DEB900AAD0D9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
DC56BDD01E46DEB900AAD0D9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
DC56BDD21E46DEB900AAD0D9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
DC0B42081A901E59008D679A /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
06B1EA7FFF5C48AB28F48C03 /* Pods_TGPControlsDemo.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DC0B421D1A901E59008D679A /* Frameworks */ = {
|
||||
DC56BDC01E46DEB900AAD0D9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
803A99D2DE444E51D1C80154 /* Pods_TGPControlsDemo.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
43F34D3BAAD6BE92D4D970B5 /* Frameworks */ = {
|
||||
10EC92099730DF4A939701BE /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D99E06034FFE0CC31C39944E /* Pods_TGPControlsDemo.framework */,
|
||||
5F81ED809FBD1E88B2963FDC /* Pods_TGPControlsDemo.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C024A6D85198B6A4399C2561 /* Pods */ = {
|
||||
5B4B1FA5E4029B453F087869 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E1E29E38530A3F94DA312C93 /* Pods-TGPControlsDemo.debug.xcconfig */,
|
||||
EA6AEAFB632330729C70C835 /* Pods-TGPControlsDemo.release.xcconfig */,
|
||||
2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */,
|
||||
2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B42021A901E59008D679A = {
|
||||
DC56BDBA1E46DEB900AAD0D9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B42301A901F09008D679A /* Podfile */,
|
||||
DC0B420D1A901E59008D679A /* TGPControlsDemo */,
|
||||
DC0B42231A901E59008D679A /* TGPControlsDemoTests */,
|
||||
DC0B420C1A901E59008D679A /* Products */,
|
||||
C024A6D85198B6A4399C2561 /* Pods */,
|
||||
43F34D3BAAD6BE92D4D970B5 /* Frameworks */,
|
||||
DC56BDC51E46DEB900AAD0D9 /* TGPControlsDemo */,
|
||||
DC56BDC41E46DEB900AAD0D9 /* Products */,
|
||||
5B4B1FA5E4029B453F087869 /* Pods */,
|
||||
10EC92099730DF4A939701BE /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B420C1A901E59008D679A /* Products */ = {
|
||||
DC56BDC41E46DEB900AAD0D9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B420B1A901E59008D679A /* TGPControlsDemo.app */,
|
||||
DC0B42201A901E59008D679A /* TGPControlsDemoTests.xctest */,
|
||||
DC56BDC31E46DEB900AAD0D9 /* TGPControlsDemo.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B420D1A901E59008D679A /* TGPControlsDemo */ = {
|
||||
DC56BDC51E46DEB900AAD0D9 /* TGPControlsDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B42101A901E59008D679A /* AppDelegate.swift */,
|
||||
DC0B42121A901E59008D679A /* ViewController.swift */,
|
||||
DC0B42141A901E59008D679A /* Main.storyboard */,
|
||||
DC0B42171A901E59008D679A /* Images.xcassets */,
|
||||
DC0B42191A901E59008D679A /* LaunchScreen.xib */,
|
||||
DC0B420E1A901E59008D679A /* Supporting Files */,
|
||||
DC56BDC61E46DEB900AAD0D9 /* AppDelegate.swift */,
|
||||
DC56BDC81E46DEB900AAD0D9 /* ViewController.swift */,
|
||||
DC56BDCA1E46DEB900AAD0D9 /* Main.storyboard */,
|
||||
DC56BDCD1E46DEB900AAD0D9 /* Assets.xcassets */,
|
||||
DC56BDCF1E46DEB900AAD0D9 /* LaunchScreen.storyboard */,
|
||||
DC56BDD21E46DEB900AAD0D9 /* Info.plist */,
|
||||
);
|
||||
path = TGPControlsDemo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B420E1A901E59008D679A /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B420F1A901E59008D679A /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B42231A901E59008D679A /* TGPControlsDemoTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B42261A901E59008D679A /* TGPControlsDemoTests.swift */,
|
||||
DC0B42241A901E59008D679A /* Supporting Files */,
|
||||
);
|
||||
path = TGPControlsDemoTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B42241A901E59008D679A /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC0B42251A901E59008D679A /* Info.plist */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
DC0B420A1A901E59008D679A /* TGPControlsDemo */ = {
|
||||
DC56BDC21E46DEB900AAD0D9 /* TGPControlsDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DC0B422A1A901E59008D679A /* Build configuration list for PBXNativeTarget "TGPControlsDemo" */;
|
||||
buildConfigurationList = DC56BDD51E46DEB900AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControlsDemo" */;
|
||||
buildPhases = (
|
||||
9DC49ADB016D0365B07A2CE3 /* Check Pods Manifest.lock */,
|
||||
DC0B42071A901E59008D679A /* Sources */,
|
||||
DC0B42081A901E59008D679A /* Frameworks */,
|
||||
DC0B42091A901E59008D679A /* Resources */,
|
||||
3FC1CB30371C38246EE22494 /* Copy Pods Resources */,
|
||||
6FE2512BFEFD20704B4B9262 /* Embed Pods Frameworks */,
|
||||
1934555AC11CDE41167D1F71 /* [CP] Check Pods Manifest.lock */,
|
||||
DC56BDBF1E46DEB900AAD0D9 /* Sources */,
|
||||
DC56BDC01E46DEB900AAD0D9 /* Frameworks */,
|
||||
DC56BDC11E46DEB900AAD0D9 /* Resources */,
|
||||
A772C50843047EE677ADAF15 /* [CP] Embed Pods Frameworks */,
|
||||
3FF2E09CAFA7D92A488FACF7 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
|
@ -158,47 +108,27 @@
|
|||
);
|
||||
name = TGPControlsDemo;
|
||||
productName = TGPControlsDemo;
|
||||
productReference = DC0B420B1A901E59008D679A /* TGPControlsDemo.app */;
|
||||
productReference = DC56BDC31E46DEB900AAD0D9 /* TGPControlsDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
DC0B421F1A901E59008D679A /* TGPControlsDemoTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DC0B422D1A901E59008D679A /* Build configuration list for PBXNativeTarget "TGPControlsDemoTests" */;
|
||||
buildPhases = (
|
||||
DC0B421C1A901E59008D679A /* Sources */,
|
||||
DC0B421D1A901E59008D679A /* Frameworks */,
|
||||
DC0B421E1A901E59008D679A /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
DC0B42221A901E59008D679A /* PBXTargetDependency */,
|
||||
);
|
||||
name = TGPControlsDemoTests;
|
||||
productName = TGPControlsDemoTests;
|
||||
productReference = DC0B42201A901E59008D679A /* TGPControlsDemoTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
DC0B42031A901E59008D679A /* Project object */ = {
|
||||
DC56BDBB1E46DEB900AAD0D9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0710;
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = TheGothicParty;
|
||||
LastSwiftUpdateCheck = 0820;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = SwiftArchitect;
|
||||
TargetAttributes = {
|
||||
DC0B420A1A901E59008D679A = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
DC0B421F1A901E59008D679A = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
TestTargetID = DC0B420A1A901E59008D679A;
|
||||
DC56BDC21E46DEB900AAD0D9 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = 55K7THBUV8;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = DC0B42061A901E59008D679A /* Build configuration list for PBXProject "TGPControlsDemo" */;
|
||||
buildConfigurationList = DC56BDBE1E46DEB900AAD0D9 /* Build configuration list for PBXProject "TGPControlsDemo" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
|
|
@ -206,46 +136,53 @@
|
|||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = DC0B42021A901E59008D679A;
|
||||
productRefGroup = DC0B420C1A901E59008D679A /* Products */;
|
||||
mainGroup = DC56BDBA1E46DEB900AAD0D9;
|
||||
productRefGroup = DC56BDC41E46DEB900AAD0D9 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
DC0B420A1A901E59008D679A /* TGPControlsDemo */,
|
||||
DC0B421F1A901E59008D679A /* TGPControlsDemoTests */,
|
||||
DC56BDC21E46DEB900AAD0D9 /* TGPControlsDemo */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
DC0B42091A901E59008D679A /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC0B42161A901E59008D679A /* Main.storyboard in Resources */,
|
||||
DC0B421B1A901E59008D679A /* LaunchScreen.xib in Resources */,
|
||||
DC0B42181A901E59008D679A /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DC0B421E1A901E59008D679A /* Resources */ = {
|
||||
DC56BDC11E46DEB900AAD0D9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC56BDD11E46DEB900AAD0D9 /* LaunchScreen.storyboard in Resources */,
|
||||
DC56BDCE1E46DEB900AAD0D9 /* Assets.xcassets in Resources */,
|
||||
DC56BDCC1E46DEB900AAD0D9 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3FC1CB30371C38246EE22494 /* Copy Pods Resources */ = {
|
||||
1934555AC11CDE41167D1F71 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy Pods Resources";
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3FF2E09CAFA7D92A488FACF7 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -253,14 +190,14 @@
|
|||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
6FE2512BFEFD20704B4B9262 /* Embed Pods Frameworks */ = {
|
||||
A772C50843047EE677ADAF15 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Embed Pods Frameworks";
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -268,75 +205,46 @@
|
|||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TGPControlsDemo/Pods-TGPControlsDemo-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9DC49ADB016D0365B07A2CE3 /* Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
DC0B42071A901E59008D679A /* Sources */ = {
|
||||
DC56BDBF1E46DEB900AAD0D9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC0B42131A901E59008D679A /* ViewController.swift in Sources */,
|
||||
DC0B42111A901E59008D679A /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DC0B421C1A901E59008D679A /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC0B42271A901E59008D679A /* TGPControlsDemoTests.swift in Sources */,
|
||||
DC56BDC91E46DEB900AAD0D9 /* ViewController.swift in Sources */,
|
||||
DC56BDC71E46DEB900AAD0D9 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
DC0B42221A901E59008D679A /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DC0B420A1A901E59008D679A /* TGPControlsDemo */;
|
||||
targetProxy = DC0B42211A901E59008D679A /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
DC0B42141A901E59008D679A /* Main.storyboard */ = {
|
||||
DC56BDCA1E46DEB900AAD0D9 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
DC0B42151A901E59008D679A /* Base */,
|
||||
DC56BDCB1E46DEB900AAD0D9 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC0B42191A901E59008D679A /* LaunchScreen.xib */ = {
|
||||
DC56BDCF1E46DEB900AAD0D9 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
DC0B421A1A901E59008D679A /* Base */,
|
||||
DC56BDD01E46DEB900AAD0D9 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.xib;
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
DC0B42281A901E59008D679A /* Debug */ = {
|
||||
DC56BDD31E46DEB900AAD0D9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
|
@ -344,43 +252,50 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC0B42291A901E59008D679A /* Release */ = {
|
||||
DC56BDD41E46DEB900AAD0D9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
|
@ -388,124 +303,89 @@
|
|||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DC0B422B1A901E59008D679A /* Debug */ = {
|
||||
DC56BDD61E46DEB900AAD0D9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E1E29E38530A3F94DA312C93 /* Pods-TGPControlsDemo.debug.xcconfig */;
|
||||
baseConfigurationReference = 2ED040B4FCE5A995907CE089 /* Pods-TGPControlsDemo.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = 55K7THBUV8;
|
||||
INFOPLIST_FILE = TGPControlsDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControlsDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC0B422C1A901E59008D679A /* Release */ = {
|
||||
DC56BDD71E46DEB900AAD0D9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = EA6AEAFB632330729C70C835 /* Pods-TGPControlsDemo.release.xcconfig */;
|
||||
baseConfigurationReference = 2F4F0B11EC6CA5DCEA1DB883 /* Pods-TGPControlsDemo.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
DEVELOPMENT_TEAM = 55K7THBUV8;
|
||||
INFOPLIST_FILE = TGPControlsDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swiftarchitect.TGPControlsDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DC0B422E1A901E59008D679A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = TGPControlsDemoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TGPControlsDemo.app/TGPControlsDemo";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC0B422F1A901E59008D679A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
);
|
||||
INFOPLIST_FILE = TGPControlsDemoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TGPControlsDemo.app/TGPControlsDemo";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
DC0B42061A901E59008D679A /* Build configuration list for PBXProject "TGPControlsDemo" */ = {
|
||||
DC56BDBE1E46DEB900AAD0D9 /* Build configuration list for PBXProject "TGPControlsDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC0B42281A901E59008D679A /* Debug */,
|
||||
DC0B42291A901E59008D679A /* Release */,
|
||||
DC56BDD31E46DEB900AAD0D9 /* Debug */,
|
||||
DC56BDD41E46DEB900AAD0D9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DC0B422A1A901E59008D679A /* Build configuration list for PBXNativeTarget "TGPControlsDemo" */ = {
|
||||
DC56BDD51E46DEB900AAD0D9 /* Build configuration list for PBXNativeTarget "TGPControlsDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC0B422B1A901E59008D679A /* Debug */,
|
||||
DC0B422C1A901E59008D679A /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DC0B422D1A901E59008D679A /* Build configuration list for PBXNativeTarget "TGPControlsDemoTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC0B422E1A901E59008D679A /* Debug */,
|
||||
DC0B422F1A901E59008D679A /* Release */,
|
||||
DC56BDD61E46DEB900AAD0D9 /* Debug */,
|
||||
DC56BDD71E46DEB900AAD0D9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = DC0B42031A901E59008D679A /* Project object */;
|
||||
rootObject = DC56BDBB1E46DEB900AAD0D9 /* Project object */;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
// @file: AppDelegate.swift
|
||||
// @project: TGPControlsDemo (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -36,33 +26,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(application: UIApplication) {
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(application: UIApplication) {
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(application: UIApplication) {
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(application: UIApplication) {
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
func applicationWillTerminate(application: UIApplication) {
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
|
|
@ -30,6 +40,16 @@
|
|||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
|
|
@ -59,6 +79,11 @@
|
|||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 TheGothicParty. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPControlsDemo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
|
|
@ -25,15 +29,15 @@
|
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eWu-CK-FWW" userLabel="Content">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPDiscreteSlider + TGPCamelLabels" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hED-uQ-kcm" userLabel="L1">
|
||||
<rect key="frame" x="8" y="20" width="290.5" height="20.5"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DiscreteSlider + CamelLabels" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hED-uQ-kcm" userLabel="L1">
|
||||
<rect key="frame" x="8" y="20" width="225" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="me6-ut-RSP" userLabel="oneTo10Labels" customClass="TGPCamelLabels">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="me6-ut-RSP" userLabel="oneTo10Labels" customClass="TGPCamelLabels" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="48" width="343" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="YPH-7w-2mY"/>
|
||||
</constraints>
|
||||
|
|
@ -56,17 +60,17 @@
|
|||
<real key="value" value="20"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.70196080207824707" green="0.70196080207824707" blue="0.70196080207824707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.70196080207824707" green="0.70196080207824707" blue="0.70196080207824707" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ABG-DJ-HY6" userLabel="oneTo10Slider" customClass="TGPDiscreteSlider">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ABG-DJ-HY6" userLabel="oneTo10Slider" customClass="TGPDiscreteSlider" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="72" width="343" height="44"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="Iam-Pd-ib7"/>
|
||||
</constraints>
|
||||
|
|
@ -97,10 +101,10 @@
|
|||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qEk-TU-odc" userLabel="pictureSlider" customClass="TGPDiscreteSlider">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qEk-TU-odc" userLabel="pictureSlider" customClass="TGPDiscreteSlider" customModule="TGPControls">
|
||||
<rect key="frame" x="37" y="155" width="300" height="21"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="300" id="CKW-ka-PbS"/>
|
||||
<constraint firstAttribute="height" constant="21" id="KGO-gb-nob"/>
|
||||
|
|
@ -135,9 +139,9 @@
|
|||
<userDefinedRuntimeAttribute type="string" keyPath="trackImage" value="track"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jca-ht-ahJ" userLabel="pictureLabels" customClass="TGPCamelLabels">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jca-ht-ahJ" userLabel="pictureLabels" customClass="TGPCamelLabels" customModule="TGPControls">
|
||||
<rect key="frame" x="24" y="124" width="327" height="32"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="32" id="xdu-yK-lYy"/>
|
||||
</constraints>
|
||||
|
|
@ -150,7 +154,7 @@
|
|||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="Futura-CondensedMedium"/>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.3411764705882353" green="0.60784313725490191" blue="0.73725490196078436" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.3411764705882353" green="0.60784313725490191" blue="0.73725490196078436" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="Futura-CondensedMedium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
|
|
@ -160,22 +164,31 @@
|
|||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.29411764705882354" green="0.35686274509803922" blue="0.43137254901960786" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.29411764705882354" green="0.35686274509803922" blue="0.43137254901960786" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="emphasisLayout">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="regularLayout">
|
||||
<integer key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="offCenter">
|
||||
<real key="value" value="0.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Layers and transparency" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1wG-kf-nie" userLabel="L2">
|
||||
<rect key="frame" x="8" y="220" width="188.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BhH-uE-SaH" userLabel="alphabetLabels" customClass="TGPCamelLabels">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BhH-uE-SaH" userLabel="alphabetLabels" customClass="TGPCamelLabels" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="248" width="343" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="XdG-yC-sgG"/>
|
||||
</constraints>
|
||||
|
|
@ -191,7 +204,7 @@
|
|||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="AvenirNext-Demibold"/>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Medium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
|
|
@ -201,13 +214,13 @@
|
|||
<real key="value" value="13"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.50196081399917603" green="0.50196081399917603" blue="0.50196081399917603" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.50196081399917603" green="0.50196081399917603" blue="0.50196081399917603" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hbc-OQ-ngs" userLabel="alphabetSlider" customClass="TGPDiscreteSlider">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hbc-OQ-ngs" userLabel="alphabetSlider" customClass="TGPDiscreteSlider" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="253" width="343" height="54"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="54" id="PeU-Hp-weJ"/>
|
||||
</constraints>
|
||||
|
|
@ -228,7 +241,7 @@
|
|||
<size key="value" width="15" height="28"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="thumbTintColor">
|
||||
<color key="value" red="0.40000000596046448" green="0.80000001192092896" blue="1" alpha="0.5" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.40000000596046448" green="0.80000001192092896" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
|
||||
<real key="value" value="0.0"/>
|
||||
|
|
@ -241,15 +254,15 @@
|
|||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPCamelLabels + UISwitch" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A6t-OF-SSy" userLabel="L3">
|
||||
<rect key="frame" x="8" y="351" width="218.5" height="20.5"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CamelLabels + Switch" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A6t-OF-SSy" userLabel="L3">
|
||||
<rect key="frame" x="8" y="351" width="169.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cr3-Gd-Hq6" userLabel="switch1Camel" customClass="TGPCamelLabels">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cr3-Gd-Hq6" userLabel="switch1Camel" customClass="TGPCamelLabels" customModule="TGPControls">
|
||||
<rect key="frame" x="99" y="380" width="49" height="18"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="TH0-qP-ycM"/>
|
||||
<constraint firstAttribute="width" constant="49" id="aNz-S2-6qd"/>
|
||||
|
|
@ -269,14 +282,14 @@
|
|||
<real key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="0.25098040699958801" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="0.25098040699958801" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Medium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081400000003" blue="0.25098040700000002" alpha="0.25" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.0" green="0.50196081400000003" blue="0.25098040700000002" alpha="0.25" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
|
|
@ -292,9 +305,9 @@
|
|||
<action selector="switch2TouchUpInside:" destination="BYZ-38-t0r" eventType="touchUpInside" id="0xh-oL-8NO"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zr4-IE-ENv" userLabel="switch2Camel" customClass="TGPCamelLabels">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zr4-IE-ENv" userLabel="switch2Camel" customClass="TGPCamelLabels" customModule="TGPControls">
|
||||
<rect key="frame" x="225" y="401" width="49" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="4gv-eK-57q"/>
|
||||
<constraint firstAttribute="width" constant="49" id="geM-TC-hSD"/>
|
||||
|
|
@ -314,10 +327,10 @@
|
|||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.2627450980392157" green="0.83137254901960789" blue="0.31764705882352939" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="0.2627450980392157" green="0.83137254901960789" blue="0.31764705882352939" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Regular"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
|
|
@ -328,13 +341,13 @@
|
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Variations" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XPd-Af-CYy" userLabel="L4">
|
||||
<rect key="frame" x="8" y="471" width="76" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ndg-v1-Tx3" userLabel="customSlider1" customClass="TGPDiscreteSlider">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ndg-v1-Tx3" userLabel="customSlider1" customClass="TGPDiscreteSlider" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="551" width="343" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" white="0.5" alpha="0.46000000000000002" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="0.5" green="0.5" blue="0.5" alpha="0.46000000000000002" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="pL3-9o-4QO"/>
|
||||
</constraints>
|
||||
|
|
@ -358,12 +371,12 @@
|
|||
<size key="value" width="44" height="44"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="thumbTintColor">
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="0.25" colorSpace="calibratedRGB"/>
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="0.25" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbSRadius">
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbShadowRadius">
|
||||
<real key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="thumbSOffset">
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="thumbShadowOffset">
|
||||
<size key="value" width="0.0" height="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
|
|
@ -371,7 +384,7 @@
|
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UIControlActions" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gID-5d-KDe">
|
||||
<rect key="frame" x="231" y="471" width="128" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" wraps="YES" minimumValue="-5" maximumValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="RC6-fY-lah">
|
||||
|
|
@ -380,9 +393,9 @@
|
|||
<action selector="stepperValueChanged:" destination="BYZ-38-t0r" eventType="valueChanged" id="CZT-vS-FyY"/>
|
||||
</connections>
|
||||
</stepper>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QFe-pU-ocw" userLabel="customSlider4" customClass="TGPDiscreteSlider">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QFe-pU-ocw" userLabel="customSlider4" customClass="TGPDiscreteSlider" customModule="TGPControls">
|
||||
<rect key="frame" x="16" y="499" width="241" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="olU-G4-MUE"/>
|
||||
</constraints>
|
||||
|
|
@ -396,7 +409,7 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="0.80000001190000003" blue="0.40000000600000002" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="gID-5d-KDe" secondAttribute="trailing" constant="8" id="0WQ-p6-iER"/>
|
||||
<constraint firstItem="qag-Wb-5DJ" firstAttribute="top" secondItem="cr3-Gd-Hq6" secondAttribute="bottom" constant="-2" id="1vB-p3-UJF"/>
|
||||
|
|
@ -460,7 +473,7 @@
|
|||
</constraints>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="Dcr-Df-pfx"/>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="P5R-SH-hrO"/>
|
||||
|
|
@ -468,7 +481,6 @@
|
|||
<constraint firstItem="DiV-DE-SKA" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailing" id="zv6-Ux-k9m"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
||||
<connections>
|
||||
<outlet property="alphabetLabels" destination="BhH-uE-SaH" id="kEj-FU-SBG"/>
|
||||
<outlet property="alphabetSlider" destination="hbc-OQ-ngs" id="4ye-LL-oZo"/>
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@
|
|||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
// @file: ViewController.swift
|
||||
// @project: TGPControlsDemo (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
// Copyright (c) 2017, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -34,95 +24,95 @@ import TGPControls
|
|||
class ViewController: UIViewController {
|
||||
@IBOutlet weak var oneTo10Labels: TGPCamelLabels!
|
||||
@IBOutlet weak var oneTo10Slider: TGPDiscreteSlider!
|
||||
|
||||
|
||||
@IBOutlet weak var alphabetLabels: TGPCamelLabels!
|
||||
@IBOutlet weak var alphabetSlider: TGPDiscreteSlider!
|
||||
|
||||
|
||||
@IBOutlet var pictureLabels: TGPCamelLabels!
|
||||
@IBOutlet var pictureSlider: TGPDiscreteSlider!
|
||||
|
||||
@IBOutlet weak var switch1Camel: TGPCamelLabels!
|
||||
@IBOutlet weak var switch2Camel: TGPCamelLabels!
|
||||
|
||||
|
||||
@IBOutlet weak var controlEventsLabel: UILabel!
|
||||
@IBOutlet weak var dualColorSlider: TGPDiscreteSlider!
|
||||
@IBOutlet weak var stepper: UIStepper!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
self.alphabetLabels.names = ["A","B","C","D","E","F", "G","H","I","J","K","L","M",
|
||||
"N","O","P","Q","R","S", "T","U","V","W","X","Y","Z"]
|
||||
self.pictureLabels.names = ["orient", "occident", "zénith", "nadir", "septentrion", "midi"]
|
||||
self.switch1Camel.names = ["OFF", "ON"]
|
||||
self.switch2Camel.names = ["O", "l"]
|
||||
|
||||
|
||||
alphabetLabels.names = ["A","B","C","D","E","F", "G","H","I","J","K","L","M",
|
||||
"N","O","P","Q","R","S", "T","U","V","W","X","Y","Z"]
|
||||
pictureLabels.names = ["orient", "occident", "zénith", "nadir", "septentrion", "midi"]
|
||||
switch1Camel.names = ["OFF", "ON"]
|
||||
switch2Camel.names = ["O", "l"]
|
||||
|
||||
// Automatically track tick spacing changes and UIControlEventValueChanged
|
||||
self.alphabetSlider.ticksListener = self.alphabetLabels
|
||||
self.oneTo10Slider.ticksListener = self.oneTo10Labels
|
||||
self.pictureSlider.ticksListener = self.pictureLabels
|
||||
alphabetSlider.ticksListener = alphabetLabels
|
||||
oneTo10Slider.ticksListener = oneTo10Labels
|
||||
pictureSlider.ticksListener = pictureLabels
|
||||
|
||||
// UIControlEvents
|
||||
self.dualColorSlider.addTarget(self, action: "touchDown:event:", forControlEvents: .TouchDown)
|
||||
self.dualColorSlider.addTarget(self, action: "touchDownRepeat:event:", forControlEvents: .TouchDownRepeat)
|
||||
self.dualColorSlider.addTarget(self, action: "touchDragInside:event:", forControlEvents: .TouchDragInside)
|
||||
self.dualColorSlider.addTarget(self, action: "touchDragOutside:event:", forControlEvents: .TouchDragOutside)
|
||||
self.dualColorSlider.addTarget(self, action: "touchDragEnter:event:", forControlEvents: .TouchDragEnter)
|
||||
self.dualColorSlider.addTarget(self, action: "touchDragExit:event:", forControlEvents: .TouchDragExit)
|
||||
self.dualColorSlider.addTarget(self, action: "touchUpInside:event:", forControlEvents: .TouchUpInside)
|
||||
self.dualColorSlider.addTarget(self, action: "touchUpOutside:event:", forControlEvents: .TouchUpOutside)
|
||||
self.dualColorSlider.addTarget(self, action: "touchCancel:event:", forControlEvents: .TouchCancel)
|
||||
self.dualColorSlider.addTarget(self, action: "valueChanged:event:", forControlEvents: .ValueChanged)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDown(_:event:)), for: .touchDown)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDownRepeat(_:event:)), for: .touchDownRepeat)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDragInside(_:event:)), for: .touchDragInside)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDragOutside(_:event:)), for: .touchDragOutside)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDragEnter(_:event:)), for: .touchDragEnter)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchDragExit(_:event:)), for: .touchDragExit)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchUpInside(_:event:)), for: .touchUpInside)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchUpOutside(_:event:)), for: .touchUpOutside)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.touchCancel(_:event:)), for: .touchCancel)
|
||||
dualColorSlider.addTarget(self, action: #selector(ViewController.valueChanged(_:event:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
// MARK: - UISwitch
|
||||
|
||||
@IBAction func switch1ValueChanged(sender: UISwitch) {
|
||||
self.switch1Camel.value = (sender.on) ? 1 : 0
|
||||
|
||||
@IBAction func switch1ValueChanged(_ sender: UISwitch) {
|
||||
switch1Camel.value = (sender.isOn) ? 1 : 0
|
||||
}
|
||||
|
||||
@IBAction func switch2TouchUpInside(sender: UISwitch) {
|
||||
self.switch2Camel.value = (sender.on) ? 1 : 0
|
||||
|
||||
@IBAction func switch2TouchUpInside(_ sender: UISwitch) {
|
||||
switch2Camel.value = (sender.isOn) ? 1 : 0
|
||||
}
|
||||
|
||||
// MARK: - UIControlEvents
|
||||
|
||||
func touchDown(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDown"
|
||||
func touchDown(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDown"
|
||||
}
|
||||
func touchDownRepeat(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDownRepeat"
|
||||
func touchDownRepeat(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDownRepeat"
|
||||
}
|
||||
func touchDragInside(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDragInside"
|
||||
func touchDragInside(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDragInside"
|
||||
}
|
||||
func touchDragOutside(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDragOutside"
|
||||
func touchDragOutside(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDragOutside"
|
||||
}
|
||||
func touchDragEnter(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDragEnter"
|
||||
func touchDragEnter(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDragEnter"
|
||||
}
|
||||
func touchDragExit(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchDragExit"
|
||||
func touchDragExit(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchDragExit"
|
||||
}
|
||||
func touchUpInside(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchUpInside"
|
||||
func touchUpInside(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchUpInside"
|
||||
}
|
||||
func touchUpOutside(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchUpOutside"
|
||||
func touchUpOutside(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchUpOutside"
|
||||
}
|
||||
func touchCancel(sender: UIControl, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "touchCancel"
|
||||
func touchCancel(_ sender: UIControl, event:UIEvent) {
|
||||
controlEventsLabel.text = "touchCancel"
|
||||
}
|
||||
func valueChanged(sender: TGPDiscreteSlider, event:UIEvent) {
|
||||
self.controlEventsLabel.text = "valueChanged"
|
||||
self.stepper.value = Double(sender.value)
|
||||
func valueChanged(_ sender: TGPDiscreteSlider, event:UIEvent) {
|
||||
controlEventsLabel.text = "valueChanged"
|
||||
stepper.value = Double(sender.value)
|
||||
}
|
||||
|
||||
// MARK: - UIStepper
|
||||
|
||||
@IBAction func stepperValueChanged(sender: UIStepper) {
|
||||
self.dualColorSlider.value = CGFloat(sender.value)
|
||||
@IBAction func stepperValueChanged(_ sender: UIStepper) {
|
||||
dualColorSlider.value = CGFloat(sender.value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
// @file: TGPControlsDemoTests.swift
|
||||
// @project: TGPControlsDemo (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class TGPControlsDemoTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
XCTAssert(true, "Pass")
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measureBlock() {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
platform :ios, '7.0'
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
target 'TGPControlsDemo7' do
|
||||
#pod 'TGPControls', :path => '../../TGPControls'
|
||||
pod 'TGPControls'
|
||||
end
|
||||
|
|
@ -1,372 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
A506FFB267F7DB477E7645C6 /* libPods-TGPControlsDemo7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */; };
|
||||
DC74B6791A901699001DC526 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B6781A901699001DC526 /* main.m */; };
|
||||
DC74B67C1A901699001DC526 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B67B1A901699001DC526 /* AppDelegate.m */; };
|
||||
DC74B67F1A901699001DC526 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC74B67E1A901699001DC526 /* ViewController.m */; };
|
||||
DC74B6821A901699001DC526 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6801A901699001DC526 /* Main.storyboard */; };
|
||||
DC74B6841A901699001DC526 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6831A901699001DC526 /* Images.xcassets */; };
|
||||
DC74B6871A901699001DC526 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC74B6851A901699001DC526 /* LaunchScreen.xib */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo7.release.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TGPControlsDemo7.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TGPControlsDemo7.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC74B6731A901699001DC526 /* TGPControlsDemo7.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TGPControlsDemo7.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DC74B6771A901699001DC526 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DC74B6781A901699001DC526 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
DC74B67A1A901699001DC526 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
DC74B67B1A901699001DC526 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
DC74B67D1A901699001DC526 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
DC74B67E1A901699001DC526 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
DC74B6811A901699001DC526 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
DC74B6831A901699001DC526 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
DC74B6861A901699001DC526 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
|
||||
DCC831371A9017670047F142 /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
DC74B6701A901699001DC526 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A506FFB267F7DB477E7645C6 /* libPods-TGPControlsDemo7.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2BAC7104A1110CC622B002A7 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C3CF5B835790FE83208A2032 /* libPods-TGPControlsDemo7.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC74B66A1A901699001DC526 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCC831371A9017670047F142 /* Podfile */,
|
||||
DC74B6751A901699001DC526 /* TGPControlsDemo7 */,
|
||||
DC74B6741A901699001DC526 /* Products */,
|
||||
EA8C94FA4563F0443C64E897 /* Pods */,
|
||||
2BAC7104A1110CC622B002A7 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC74B6741A901699001DC526 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC74B6731A901699001DC526 /* TGPControlsDemo7.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC74B6751A901699001DC526 /* TGPControlsDemo7 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC74B67A1A901699001DC526 /* AppDelegate.h */,
|
||||
DC74B67B1A901699001DC526 /* AppDelegate.m */,
|
||||
DC74B67D1A901699001DC526 /* ViewController.h */,
|
||||
DC74B67E1A901699001DC526 /* ViewController.m */,
|
||||
DC74B6801A901699001DC526 /* Main.storyboard */,
|
||||
DC74B6831A901699001DC526 /* Images.xcassets */,
|
||||
DC74B6851A901699001DC526 /* LaunchScreen.xib */,
|
||||
DC74B6761A901699001DC526 /* Supporting Files */,
|
||||
);
|
||||
path = TGPControlsDemo7;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC74B6761A901699001DC526 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC74B6771A901699001DC526 /* Info.plist */,
|
||||
DC74B6781A901699001DC526 /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EA8C94FA4563F0443C64E897 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */,
|
||||
3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
DC74B6721A901699001DC526 /* TGPControlsDemo7 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DC74B6961A901699001DC526 /* Build configuration list for PBXNativeTarget "TGPControlsDemo7" */;
|
||||
buildPhases = (
|
||||
FEE5971EB6029A24184C34B2 /* Check Pods Manifest.lock */,
|
||||
DC74B66F1A901699001DC526 /* Sources */,
|
||||
DC74B6701A901699001DC526 /* Frameworks */,
|
||||
DC74B6711A901699001DC526 /* Resources */,
|
||||
CEF1711B486B1BADB4F115FF /* Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = TGPControlsDemo7;
|
||||
productName = TGPControlsDemo7;
|
||||
productReference = DC74B6731A901699001DC526 /* TGPControlsDemo7.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
DC74B66B1A901699001DC526 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = TheGothicParty;
|
||||
TargetAttributes = {
|
||||
DC74B6721A901699001DC526 = {
|
||||
CreatedOnToolsVersion = 6.1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = DC74B66E1A901699001DC526 /* Build configuration list for PBXProject "TGPControlsDemo7" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = DC74B66A1A901699001DC526;
|
||||
productRefGroup = DC74B6741A901699001DC526 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
DC74B6721A901699001DC526 /* TGPControlsDemo7 */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
DC74B6711A901699001DC526 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC74B6821A901699001DC526 /* Main.storyboard in Resources */,
|
||||
DC74B6871A901699001DC526 /* LaunchScreen.xib in Resources */,
|
||||
DC74B6841A901699001DC526 /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
CEF1711B486B1BADB4F115FF /* Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TGPControlsDemo7/Pods-TGPControlsDemo7-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FEE5971EB6029A24184C34B2 /* Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
DC74B66F1A901699001DC526 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DC74B67F1A901699001DC526 /* ViewController.m in Sources */,
|
||||
DC74B67C1A901699001DC526 /* AppDelegate.m in Sources */,
|
||||
DC74B6791A901699001DC526 /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
DC74B6801A901699001DC526 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
DC74B6811A901699001DC526 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DC74B6851A901699001DC526 /* LaunchScreen.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
DC74B6861A901699001DC526 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
DC74B6941A901699001DC526 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC74B6951A901699001DC526 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
DC74B6971A901699001DC526 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9D6EC9A4396AF16D62F320EE /* Pods-TGPControlsDemo7.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
INFOPLIST_FILE = TGPControlsDemo7/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DC74B6981A901699001DC526 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 3227B7F26D7BFA5B9536A0DB /* Pods-TGPControlsDemo7.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
INFOPLIST_FILE = TGPControlsDemo7/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
DC74B66E1A901699001DC526 /* Build configuration list for PBXProject "TGPControlsDemo7" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC74B6941A901699001DC526 /* Debug */,
|
||||
DC74B6951A901699001DC526 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DC74B6961A901699001DC526 /* Build configuration list for PBXNativeTarget "TGPControlsDemo7" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DC74B6971A901699001DC526 /* Debug */,
|
||||
DC74B6981A901699001DC526 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = DC74B66B1A901699001DC526 /* Project object */;
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
// @file: AppDelegate.h
|
||||
// @project: TGPControlsDemo7 (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
// @file: AppDelegate.m
|
||||
// @project: TGPControlsDemo7 (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 TheGothicParty. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPControlsDemo7" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="548" y="455"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -1,485 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DiV-DE-SKA" userLabel="Scroll">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eWu-CK-FWW" userLabel="Content">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPDiscreteSlider + TGPCamelLabels" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hED-uQ-kcm" userLabel="L1">
|
||||
<rect key="frame" x="8" y="20" width="290.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="me6-ut-RSP" userLabel="oneTo10Labels" customClass="TGPCamelLabels7">
|
||||
<rect key="frame" x="16" y="48" width="343" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="YPH-7w-2mY"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="ticksDistance">
|
||||
<real key="value" value="33"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="AvenirNext-Regular"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Regular"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
<real key="value" value="20"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="20"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.70196080207824707" green="0.70196080207824707" blue="0.70196080207824707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ABG-DJ-HY6" userLabel="oneTo10Slider" customClass="TGPDiscreteSlider7">
|
||||
<rect key="frame" x="16" y="72" width="343" height="44"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="Iam-Pd-ib7"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickStyle">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackStyle">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="incrementValue">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackThickness">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="tickSize">
|
||||
<size key="value" width="1" height="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qEk-TU-odc" userLabel="pictureSlider" customClass="TGPDiscreteSlider7">
|
||||
<rect key="frame" x="37" y="155" width="300" height="21"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="300" id="CKW-ka-PbS"/>
|
||||
<constraint firstAttribute="height" constant="21" id="KGO-gb-nob"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickStyle">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackStyle">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbStyle">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="6"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="tickSize">
|
||||
<size key="value" width="1" height="26"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="incrementValue">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="thumbImage" value="thumb"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="tickImage" value="tick"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="trackImage" value="track"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jca-ht-ahJ" userLabel="pictureLabels" customClass="TGPCamelLabels7">
|
||||
<rect key="frame" x="24" y="124" width="327" height="32"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="32" id="xdu-yK-lYy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="6"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="ticksDistance">
|
||||
<real key="value" value="55"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="Futura-CondensedMedium"/>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.3411764705882353" green="0.60784313725490191" blue="0.73725490196078436" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="Futura-CondensedMedium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
<real key="value" value="17"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.29411764705882354" green="0.35686274509803922" blue="0.43137254901960786" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Layers and transparency" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1wG-kf-nie" userLabel="L2">
|
||||
<rect key="frame" x="8" y="220" width="188.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BhH-uE-SaH" userLabel="alphabetLabels" customClass="TGPCamelLabels7">
|
||||
<rect key="frame" x="16" y="248" width="343" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="XdG-yC-sgG"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="26"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="ticksDistance">
|
||||
<real key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="13"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="AvenirNext-Demibold"/>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Medium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
<real key="value" value="13"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="13"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.50196081399917603" green="0.50196081399917603" blue="0.50196081399917603" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hbc-OQ-ngs" userLabel="alphabetSlider" customClass="TGPDiscreteSlider7">
|
||||
<rect key="frame" x="16" y="253" width="343" height="54"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="54" id="PeU-Hp-weJ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickStyle">
|
||||
<integer key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="26"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackStyle">
|
||||
<integer key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbStyle">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="thumbSize">
|
||||
<size key="value" width="15" height="28"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="thumbTintColor">
|
||||
<color key="value" red="0.40000000596046448" green="0.80000001192092896" blue="1" alpha="0.5" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<real key="value" value="13"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="incrementValue">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TGPCamelLabels + UISwitch" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A6t-OF-SSy" userLabel="L3">
|
||||
<rect key="frame" x="8" y="351" width="218.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cr3-Gd-Hq6" userLabel="switch1Camel" customClass="TGPCamelLabels7">
|
||||
<rect key="frame" x="99" y="380" width="49" height="18"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="TH0-qP-ycM"/>
|
||||
<constraint firstAttribute="width" constant="49" id="aNz-S2-6qd"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="ticksDistance">
|
||||
<real key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="AvenirNext-Medium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
<real key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081399917603" blue="0.25098040699958801" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Medium"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="0.0" green="0.50196081400000003" blue="0.25098040700000002" alpha="0.25" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qag-Wb-5DJ" userLabel="switch1">
|
||||
<rect key="frame" x="99" y="396" width="51" height="31"/>
|
||||
<connections>
|
||||
<action selector="switch1ValueChanged:" destination="BYZ-38-t0r" eventType="valueChanged" id="5bc-7D-vJF"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VFm-r7-f2K" userLabel="switch2">
|
||||
<rect key="frame" x="225" y="396" width="51" height="31"/>
|
||||
<connections>
|
||||
<action selector="switch2TouchUpInside:" destination="BYZ-38-t0r" eventType="touchUpInside" id="0xh-oL-8NO"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zr4-IE-ENv" userLabel="switch2Camel" customClass="TGPCamelLabels7">
|
||||
<rect key="frame" x="225" y="401" width="49" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="4gv-eK-57q"/>
|
||||
<constraint firstAttribute="width" constant="49" id="geM-TC-hSD"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="ticksDistance">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="value">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="upFontName" value="AvenirNext-Regular"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="upFontSize">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="upFontColor">
|
||||
<color key="value" red="0.2627450980392157" green="0.83137254901960789" blue="0.31764705882352939" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="downFontColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="downFontName" value="AvenirNext-Regular"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="downFontSize">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Variations" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XPd-Af-CYy" userLabel="L4">
|
||||
<rect key="frame" x="8" y="471" width="76" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QFe-pU-ocw" userLabel="customSlider4" customClass="TGPDiscreteSlider7">
|
||||
<rect key="frame" x="16" y="499" width="241" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="olU-G4-MUE"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickStyle">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackStyle">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ndg-v1-Tx3" userLabel="customSlider1" customClass="TGPDiscreteSlider7">
|
||||
<rect key="frame" x="16" y="551" width="343" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" white="0.33333333333333331" alpha="0.25" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="pL3-9o-4QO"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickStyle">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="tickSize">
|
||||
<size key="value" width="14" height="14"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="tickCount">
|
||||
<integer key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="trackStyle">
|
||||
<integer key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbStyle">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="thumbSize">
|
||||
<size key="value" width="44" height="44"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="thumbTintColor">
|
||||
<color key="value" red="1" green="0.0" blue="0.0" alpha="0.25" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbShadowRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="thumbShadowOffset">
|
||||
<size key="value" width="0.0" height="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UIControlActions" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gID-5d-KDe">
|
||||
<rect key="frame" x="231" y="471" width="128" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" wraps="YES" minimumValue="-5" maximumValue="5" translatesAutoresizingMaskIntoConstraints="NO" id="dZr-C5-Tpu">
|
||||
<rect key="frame" x="265" y="506" width="94" height="29"/>
|
||||
<connections>
|
||||
<action selector="stepperValueChanged:" destination="BYZ-38-t0r" eventType="valueChanged" id="GOK-Ua-PMJ"/>
|
||||
</connections>
|
||||
</stepper>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="gID-5d-KDe" secondAttribute="trailing" constant="8" id="0WQ-p6-iER"/>
|
||||
<constraint firstItem="qag-Wb-5DJ" firstAttribute="top" secondItem="cr3-Gd-Hq6" secondAttribute="bottom" constant="-2" id="1vB-p3-UJF"/>
|
||||
<constraint firstItem="hbc-OQ-ngs" firstAttribute="top" secondItem="BhH-uE-SaH" secondAttribute="bottom" constant="-35" id="5p4-Ib-Aqy"/>
|
||||
<constraint firstItem="XPd-Af-CYy" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" id="7en-GF-yv8"/>
|
||||
<constraint firstItem="VFm-r7-f2K" firstAttribute="centerY" secondItem="qag-Wb-5DJ" secondAttribute="centerY" id="8Jn-GI-7WS"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="hbc-OQ-ngs" secondAttribute="trailing" constant="8" id="8wZ-Cr-wjl"/>
|
||||
<constraint firstItem="Jca-ht-ahJ" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="16" id="CfR-vD-iI4"/>
|
||||
<constraint firstItem="A6t-OF-SSy" firstAttribute="top" secondItem="hbc-OQ-ngs" secondAttribute="bottom" constant="44" id="DQx-2B-c9h"/>
|
||||
<constraint firstItem="dZr-C5-Tpu" firstAttribute="leading" secondItem="QFe-pU-ocw" secondAttribute="trailing" constant="8" symbolic="YES" id="Hkg-kV-7LV"/>
|
||||
<constraint firstItem="dZr-C5-Tpu" firstAttribute="trailing" secondItem="eWu-CK-FWW" secondAttribute="trailingMargin" constant="-8" id="Iel-NZ-5uf"/>
|
||||
<constraint firstItem="hbc-OQ-ngs" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="JYF-px-uat"/>
|
||||
<constraint firstItem="qEk-TU-odc" firstAttribute="centerX" secondItem="eWu-CK-FWW" secondAttribute="centerX" id="KUF-EC-cLO"/>
|
||||
<constraint firstItem="QFe-pU-ocw" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="LlO-Vk-bA7"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="Ndg-v1-Tx3" secondAttribute="trailing" constant="8" id="NW0-4E-i8E"/>
|
||||
<constraint firstAttribute="height" constant="647" id="Nwm-xh-vZf"/>
|
||||
<constraint firstItem="ABG-DJ-HY6" firstAttribute="trailing" secondItem="eWu-CK-FWW" secondAttribute="trailingMargin" constant="-8" id="OAO-EM-NPL"/>
|
||||
<constraint firstItem="hED-uQ-kcm" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" id="P9g-je-5Du"/>
|
||||
<constraint firstItem="qag-Wb-5DJ" firstAttribute="centerX" secondItem="eWu-CK-FWW" secondAttribute="centerX" multiplier="0.66" id="Qzg-UZ-6cQ"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="Jca-ht-ahJ" secondAttribute="trailing" constant="16" id="RFq-1v-q2h"/>
|
||||
<constraint firstItem="Jca-ht-ahJ" firstAttribute="top" secondItem="ABG-DJ-HY6" secondAttribute="bottom" constant="8" symbolic="YES" id="Suh-QG-3bx"/>
|
||||
<constraint firstItem="me6-ut-RSP" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="Tsr-Ui-3E4"/>
|
||||
<constraint firstItem="A6t-OF-SSy" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" id="UqB-YM-c54"/>
|
||||
<constraint firstItem="dZr-C5-Tpu" firstAttribute="centerY" secondItem="QFe-pU-ocw" secondAttribute="centerY" id="VF8-5I-VFd"/>
|
||||
<constraint firstItem="1wG-kf-nie" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" id="WbT-PJ-Z4t"/>
|
||||
<constraint firstItem="gID-5d-KDe" firstAttribute="baseline" secondItem="XPd-Af-CYy" secondAttribute="baseline" id="YkN-mo-dau"/>
|
||||
<constraint firstItem="cr3-Gd-Hq6" firstAttribute="top" secondItem="A6t-OF-SSy" secondAttribute="bottom" constant="8" symbolic="YES" id="Ztk-5o-3a0"/>
|
||||
<constraint firstItem="1wG-kf-nie" firstAttribute="top" secondItem="qEk-TU-odc" secondAttribute="bottom" constant="44" id="afo-jx-kpZ"/>
|
||||
<constraint firstItem="Ndg-v1-Tx3" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="czJ-zn-XCo"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="BhH-uE-SaH" secondAttribute="trailing" constant="8" id="dtS-Ph-zAA"/>
|
||||
<constraint firstItem="qEk-TU-odc" firstAttribute="top" secondItem="Jca-ht-ahJ" secondAttribute="bottom" constant="-1" id="fvc-2X-ahE"/>
|
||||
<constraint firstItem="cr3-Gd-Hq6" firstAttribute="centerX" secondItem="qag-Wb-5DJ" secondAttribute="centerX" id="gw0-nt-CIO"/>
|
||||
<constraint firstItem="hED-uQ-kcm" firstAttribute="top" secondItem="eWu-CK-FWW" secondAttribute="top" constant="20" symbolic="YES" id="hMh-rx-udj"/>
|
||||
<constraint firstItem="XPd-Af-CYy" firstAttribute="top" secondItem="qag-Wb-5DJ" secondAttribute="bottom" constant="44" id="i97-rY-DQL"/>
|
||||
<constraint firstItem="Zr4-IE-ENv" firstAttribute="centerY" secondItem="VFm-r7-f2K" secondAttribute="centerY" id="ivA-ag-HMK"/>
|
||||
<constraint firstItem="ABG-DJ-HY6" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="jNz-wq-h0l"/>
|
||||
<constraint firstItem="Ndg-v1-Tx3" firstAttribute="top" secondItem="QFe-pU-ocw" secondAttribute="bottom" constant="8" symbolic="YES" id="kOg-ni-91m"/>
|
||||
<constraint firstItem="me6-ut-RSP" firstAttribute="top" secondItem="hED-uQ-kcm" secondAttribute="bottom" constant="8" symbolic="YES" id="krk-sF-r4n"/>
|
||||
<constraint firstItem="me6-ut-RSP" firstAttribute="trailing" secondItem="eWu-CK-FWW" secondAttribute="trailingMargin" constant="-8" id="ltM-om-wyk"/>
|
||||
<constraint firstItem="QFe-pU-ocw" firstAttribute="top" secondItem="XPd-Af-CYy" secondAttribute="bottom" constant="8" symbolic="YES" id="nLx-CN-xDR"/>
|
||||
<constraint firstItem="BhH-uE-SaH" firstAttribute="leading" secondItem="eWu-CK-FWW" secondAttribute="leadingMargin" constant="8" id="pQ9-Hh-aXC"/>
|
||||
<constraint firstItem="BhH-uE-SaH" firstAttribute="top" secondItem="1wG-kf-nie" secondAttribute="bottom" constant="8" symbolic="YES" id="qeV-sc-pdk"/>
|
||||
<constraint firstItem="VFm-r7-f2K" firstAttribute="centerX" secondItem="eWu-CK-FWW" secondAttribute="centerX" multiplier="1.33" id="qkg-jD-FiO"/>
|
||||
<constraint firstItem="ABG-DJ-HY6" firstAttribute="top" secondItem="me6-ut-RSP" secondAttribute="bottom" constant="-16" id="thz-co-HRH"/>
|
||||
<constraint firstItem="Zr4-IE-ENv" firstAttribute="centerX" secondItem="VFm-r7-f2K" secondAttribute="centerX" id="uZT-Xj-m1Q"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="eWu-CK-FWW" firstAttribute="leading" secondItem="DiV-DE-SKA" secondAttribute="leading" id="6Iw-8k-BNJ"/>
|
||||
<constraint firstItem="eWu-CK-FWW" firstAttribute="top" secondItem="DiV-DE-SKA" secondAttribute="top" id="EhX-oU-vfq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eWu-CK-FWW" secondAttribute="trailing" id="L7u-VB-Oe6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eWu-CK-FWW" secondAttribute="bottom" id="Zje-Up-DVu"/>
|
||||
<constraint firstItem="eWu-CK-FWW" firstAttribute="centerX" secondItem="DiV-DE-SKA" secondAttribute="centerX" id="w4t-e1-u4S"/>
|
||||
</constraints>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="Dcr-Df-pfx"/>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="bottom" secondItem="wfy-db-euE" secondAttribute="top" id="P5R-SH-hrO"/>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="zbm-0n-qcK"/>
|
||||
<constraint firstItem="DiV-DE-SKA" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailing" id="zv6-Ux-k9m"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
||||
<connections>
|
||||
<outlet property="alphabetLabels" destination="BhH-uE-SaH" id="yzb-hl-WpS"/>
|
||||
<outlet property="alphabetSlider" destination="hbc-OQ-ngs" id="ut0-mX-eWi"/>
|
||||
<outlet property="controlEventsLabel" destination="gID-5d-KDe" id="WZa-pO-zC1"/>
|
||||
<outlet property="dualColorSlider" destination="QFe-pU-ocw" id="hXP-7M-X6d"/>
|
||||
<outlet property="oneTo10Labels" destination="me6-ut-RSP" id="Q7C-To-wNy"/>
|
||||
<outlet property="oneTo10Slider" destination="ABG-DJ-HY6" id="4IX-Ms-Fsr"/>
|
||||
<outlet property="pictureLabels" destination="Jca-ht-ahJ" id="LvS-21-T33"/>
|
||||
<outlet property="pictureSlider" destination="qEk-TU-odc" id="UbI-hb-jmT"/>
|
||||
<outlet property="stepper" destination="dZr-C5-Tpu" id="JLB-gv-fJc"/>
|
||||
<outlet property="switch1Camel" destination="cr3-Gd-Hq6" id="MwF-sx-QsC"/>
|
||||
<outlet property="switch2Camel" destination="Zr4-IE-ENv" id="B2K-uv-vmB"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="344.5" y="332.5"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Default-2x.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"filename" : "Default-Retina4.png",
|
||||
"minimum-system-version" : "7.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "wthumb.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.5 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "wtick.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.4 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "wtrack.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.7 KiB |
|
|
@ -1,47 +0,0 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
// @file: ViewController.m
|
||||
// @project: TGPControlsDemo7 (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "ViewController.h"
|
||||
#import "TGPDiscreteSlider7.h"
|
||||
#import "TGPCamelLabels7.h"
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
// iOS 7 does not support IBInspectable, so use the .7 class for both controls.
|
||||
// If your project targets iOS 8+, you should use TGPDiscreteSlider & TGPCamelLabels instead
|
||||
|
||||
@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *oneTo10Labels;
|
||||
@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *oneTo10Slider;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *alphabetLabels;
|
||||
@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *alphabetSlider;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet TGPCamelLabels7 * pictureLabels;
|
||||
@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 * pictureSlider;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *switch1Camel;
|
||||
@property (weak, nonatomic) IBOutlet TGPCamelLabels7 *switch2Camel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *controlEventsLabel;
|
||||
@property (weak, nonatomic) IBOutlet TGPDiscreteSlider7 *dualColorSlider;
|
||||
@property (weak, nonatomic) IBOutlet UIStepper *stepper;
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
self.alphabetLabels.names = @[@"A",@"B",@"C",@"D",@"E",@"F", @"G",@"H",@"I",@"J",@"K",@"L",@"M",
|
||||
@"N",@"O",@"P",@"Q",@"R",@"S", @"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
|
||||
self.pictureLabels.names = @[@"orient", @"occident", @"zénith", @"nadir", @"septentrion", @"midi"];
|
||||
self.switch1Camel.names = @[@"OFF", @"ON"];
|
||||
self.switch2Camel.names = @[@"O", @"l"];
|
||||
|
||||
// Automatically track tick spacing changes
|
||||
self.alphabetSlider.ticksListener = self.alphabetLabels;
|
||||
self.oneTo10Slider.ticksListener = self.oneTo10Labels;
|
||||
self.pictureSlider.ticksListener = self.pictureLabels;
|
||||
|
||||
// UIControlEvents
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDown:event:) forControlEvents:UIControlEventTouchDown];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDownRepeat:event:) forControlEvents:UIControlEventTouchDownRepeat];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDragInside:event:) forControlEvents:UIControlEventTouchDragInside];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDragOutside:event:) forControlEvents:UIControlEventTouchDragOutside];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDragEnter:event:) forControlEvents:UIControlEventTouchDragEnter];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchDragExit:event:) forControlEvents:UIControlEventTouchDragExit];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchUpInside:event:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchUpOutside:event:) forControlEvents:UIControlEventTouchUpOutside];
|
||||
[self.dualColorSlider addTarget:self action:@selector(touchCancel:event:) forControlEvents:UIControlEventTouchCancel];
|
||||
[self.dualColorSlider addTarget:self action:@selector(valueChanged:event:) forControlEvents:UIControlEventValueChanged];
|
||||
}
|
||||
|
||||
#pragma mark - UISwitch
|
||||
|
||||
- (IBAction)switch1ValueChanged:(UISwitch *)sender {
|
||||
[self.switch1Camel setValue:((sender.isOn) ? 1 : 0)];
|
||||
}
|
||||
|
||||
- (IBAction)switch2TouchUpInside:(UISwitch *)sender {
|
||||
[self.switch2Camel setValue:((sender.isOn) ? 1 : 0)];
|
||||
}
|
||||
|
||||
#pragma mark - UIControlEvents
|
||||
|
||||
- (void)touchDown:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDown";
|
||||
}
|
||||
- (void)touchDownRepeat:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDownRepeat";
|
||||
}
|
||||
- (void)touchDragInside:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDragInside";
|
||||
}
|
||||
- (void)touchDragOutside:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDragOutside";
|
||||
}
|
||||
- (void)touchDragEnter:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDragEnter";
|
||||
}
|
||||
- (void)touchDragExit:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchDragExit";
|
||||
}
|
||||
- (void)touchUpInside:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchUpInside";
|
||||
}
|
||||
- (void)touchUpOutside:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchUpOutside";
|
||||
}
|
||||
- (void)touchCancel:(UIControl *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"touchCancel";
|
||||
}
|
||||
- (void)valueChanged:(TGPDiscreteSlider7 *)sender event:(UIEvent *)event {
|
||||
self.controlEventsLabel.text = @"valueChanged";
|
||||
self.stepper.value = (double) sender.value;
|
||||
}
|
||||
|
||||
#pragma mark - UIStepper
|
||||
|
||||
- (IBAction)stepperValueChanged:(UIStepper *)sender {
|
||||
self.dualColorSlider.value = (CGFloat) sender.value;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// @file: main.m
|
||||
// @project: TGPControlsDemo7 (TGPControls)
|
||||
//
|
||||
// @history: Created November 27, 2014 (Thanksgiving Day)
|
||||
// @author: Xavier Schott
|
||||
// mailto://xschott@gmail.com
|
||||
// http://thegothicparty.com
|
||||
// tel://+18089383634
|
||||
//
|
||||
// @license: http://opensource.org/licenses/MIT
|
||||
// Copyright (c) 2014, Xavier Schott
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.thegothicparty.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||