├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Package.swift
├── PaperSwitch
└── RAMPaperSwitch.swift
├── PaperSwitchDemo
├── PaperSwitch
│ ├── Info.plist
│ └── PaperSwitch.h
├── PaperSwitchDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── PaperSwitch.xcscheme
├── PaperSwitchDemo
│ ├── AppDelegate.swift
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── LaunchImage.launchimage
│ │ │ └── Contents.json
│ │ ├── btn_next.imageset
│ │ │ ├── Contents.json
│ │ │ └── next.png
│ │ ├── img_phone_off.imageset
│ │ │ ├── Contents.json
│ │ │ └── phone_off.png
│ │ ├── img_phone_on.imageset
│ │ │ ├── Contents.json
│ │ │ └── phone_on.png
│ │ ├── img_users1.imageset
│ │ │ ├── Contents.json
│ │ │ └── users1.png
│ │ └── img_users2.imageset
│ │ │ ├── Contents.json
│ │ │ └── users2.png
│ ├── Info.plist
│ ├── Launch.storyboard
│ ├── Main.storyboard
│ └── ViewController.swift
└── PaperSwitchDemoTests
│ ├── Info.plist
│ └── PaperSwitchDemoTests.swift
├── RAMPaperSwitch.podspec
├── README.md
├── docs
├── Classes.html
├── Classes
│ └── RAMPaperSwitch.html
├── css
│ ├── highlight.css
│ └── jazzy.css
├── docsets
│ ├── PaperSwitchDemo.docset
│ │ └── Contents
│ │ │ ├── Info.plist
│ │ │ └── Resources
│ │ │ ├── Documents
│ │ │ ├── Classes.html
│ │ │ ├── Classes
│ │ │ │ └── RAMPaperSwitch.html
│ │ │ ├── css
│ │ │ │ ├── highlight.css
│ │ │ │ └── jazzy.css
│ │ │ ├── img
│ │ │ │ ├── carat.png
│ │ │ │ ├── dash.png
│ │ │ │ └── gh.png
│ │ │ ├── index.html
│ │ │ ├── js
│ │ │ │ ├── jazzy.js
│ │ │ │ └── jquery.min.js
│ │ │ └── undocumented.txt
│ │ │ └── docSet.dsidx
│ └── PaperSwitchDemo.tgz
├── img
│ ├── carat.png
│ ├── dash.png
│ └── gh.png
├── index.html
├── js
│ ├── jazzy.js
│ └── jquery.min.js
└── undocumented.txt
├── header.png
├── paper-switch.gif
└── screenshot.gif
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | .build/
41 |
42 | # CocoaPods
43 | #
44 | # We recommend against adding the Pods directory to your .gitignore. However
45 | # you should judge for yourself, the pros and cons are mentioned at:
46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
47 | #
48 | # Pods/
49 |
50 | # Carthage
51 | #
52 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
53 | # Carthage/Checkouts
54 |
55 | Carthage/Build
56 |
57 | # fastlane
58 | #
59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
60 | # screenshots whenever they are needed.
61 | # For more information about the recommended setup visit:
62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
63 |
64 | fastlane/report.xml
65 | fastlane/Preview.html
66 | fastlane/screenshots
67 | fastlane/test_output
68 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | osx_image: xcode8
2 | language: objective-c
3 |
4 | xcode_project: PaperSwitchDemo/PaperSwitchDemo.xcodeproj
5 | xcode_scheme: PaperSwitch
6 | xcode_sdk: iphonesimulator
7 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/CHANGELOG.md
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to a Project
2 | Now that you’ve found the material for understanding the project, here is how you can take action.
3 |
4 | ### Create an Issue
5 |
6 | If you find a bug in a project you’re using (and you don’t know how to fix it), have trouble following the documentation or have a question about the project – create an issue! There’s nothing to it and whatever issue you’re having, you’re likely not the only one, so others will find your issue helpful, too. For more information on how issues work, check out our Issues guide.
7 |
8 | #### Issues Pro Tips
9 |
10 | Check existing issues for your issue. Duplicating an issue is slower for both parties so search through open and closed issues to see if what you’re running into has been addressed already.
11 | Be clear about what your problem is: what was the expected outcome, what happened instead? Detail how someone else can recreate the problem.
12 | Link to demos recreating the problem on things like JSFiddle or CodePen.
13 | Include system details like what the browser, library or operating system you’re using and its version.
14 | Paste error output or logs in your issue or in a Gist. If pasting them in the issue, wrap it in three backticks: ``` so that it renders nicely.
15 |
16 | ### Pull Request
17 |
18 | If you’re able to patch the bug or add the feature yourself – fantastic, make a pull request with the code! Be sure you’ve read any documents on contributing, understand the license and have signed a CLA if required. Once you’ve submitted a pull request the maintainer(s) can compare your branch to the existing one and decide whether or not to incorporate (pull in) your changes.
19 |
20 | #### Pull Request Pro Tips
21 |
22 | Fork the repository and clone it locally. Connect your local to the original ‘upstream’ repository by adding it as a remote. Pull in changes from ‘upstream’ often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. See more detailed instructions here.
23 | Create a branch for your edits.
24 | Be clear about what problem is occurring and how someone can recreate that problem or why your feature will help. Then be equally as clear about the steps you took to make your changes.
25 | It’s best to test. Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
26 | Include screenshots of the before and after if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
27 | Contribute in the style of the project to the best of your abilities. This may mean using indents, semi colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
28 |
29 | #### Open Pull Requests
30 |
31 | Once you’ve opened a pull request a discussion will start around your proposed changes. Other contributors and users may chime in, but ultimately the decision is made by the maintainer(s). You may be asked to make some changes to your pull request, if so, add more commits to your branch and push them – they’ll automatically go into the existing pull request.
32 |
33 | If your pull request is merged – great! If it is not, no sweat, it may not be what the project maintainer had in mind, or they were already working on it. This happens, so our recommendation is to take any feedback you’ve received and go forth and pull request again – or create your own open source project.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Ramotion
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.1
2 | //
3 | // Package.swift
4 | //
5 | // Copyright (c) Ramotion (https://www.ramotion.com/)
6 | //
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy
8 | // of this software and associated documentation files (the "Software"), to deal
9 | // in the Software without restriction, including without limitation the rights
10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | // copies of the Software, and to permit persons to whom the Software is
12 | // furnished to do so, subject to the following conditions:
13 | //
14 | // The above copyright notice and this permission notice shall be included in
15 | // all copies or substantial portions of the Software.
16 | //
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | // THE SOFTWARE.
24 | //
25 |
26 | import PackageDescription
27 |
28 |
29 | let package = Package(
30 | name: "PaperSwitch",
31 | platforms: [
32 | .iOS(.v9)
33 | ],
34 | products: [
35 | .library(name: "PaperSwitch",
36 | targets: ["PaperSwitch"]),
37 | ],
38 | targets: [
39 | .target(name: "PaperSwitch",
40 | path: "PaperSwitch")
41 | ],
42 | swiftLanguageVersions: [.v5]
43 | )
44 |
--------------------------------------------------------------------------------
/PaperSwitch/RAMPaperSwitch.swift:
--------------------------------------------------------------------------------
1 | // RAMPaperSwitch.swift
2 | //
3 | // Copyright (c) 26/11/14 Ramotion Inc. (http://ramotion.com)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | import UIKit
24 |
25 | /// Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.
26 | open class RAMPaperSwitch: UISwitch, CAAnimationDelegate {
27 |
28 | struct Constants {
29 | static let scale = "transform.scale"
30 | static let up = "scaleUp"
31 | static let down = "scaleDown"
32 | }
33 |
34 | /// The total duration of the animations, measured in seconds. Default 0.35
35 | @IBInspectable open var duration: Double = 0.35
36 |
37 | /// Closuer call when animation start
38 | open var animationDidStartClosure = {(onAnimation: Bool) -> Void in }
39 |
40 | /// Closuer call when animation finish
41 | open var animationDidStopClosure = {(onAnimation: Bool, finished: Bool) -> Void in }
42 |
43 | fileprivate var shape: CAShapeLayer! = CAShapeLayer()
44 | fileprivate var radius: CGFloat = 0.0
45 | fileprivate var oldState = false
46 |
47 | fileprivate var defaultTintColor: UIColor?
48 | @IBOutlet open var parentView: UIView? {
49 | didSet {
50 | defaultTintColor = parentView?.backgroundColor
51 | }
52 | }
53 |
54 | // MARK: - Initialization
55 |
56 | /**
57 | Returns an initialized switch object.
58 |
59 | - parameter view: animatable view
60 | - parameter color: The color which fill view.
61 |
62 | - returns: An initialized UISwitch object.
63 | */
64 | public required init(view: UIView?, color: UIColor?) {
65 | super.init(frame: CGRect.zero)
66 | onTintColor = color
67 | self.commonInit(view)
68 | }
69 |
70 | public required init?(coder aDecoder: NSCoder) {
71 | super.init(coder: aDecoder)
72 | }
73 |
74 | override open func awakeFromNib() {
75 | self.commonInit(parentView ?? superview)
76 | super.awakeFromNib()
77 | }
78 |
79 | // MARK: Helpers
80 | fileprivate func commonInit(_ parentView: UIView?) {
81 | guard let onTintColor = self.onTintColor else {
82 | fatalError("set tint color")
83 | }
84 | self.parentView = parentView
85 | defaultTintColor = parentView?.backgroundColor
86 |
87 | layer.borderWidth = 0.5
88 | layer.borderColor = UIColor.white.cgColor
89 | layer.cornerRadius = frame.size.height / 2
90 |
91 | shape.fillColor = onTintColor.cgColor
92 | shape.masksToBounds = true
93 |
94 | parentView?.layer.insertSublayer(shape, at: 0)
95 | parentView?.layer.masksToBounds = true
96 |
97 | showShapeIfNeed()
98 |
99 | addTarget(self, action: #selector(RAMPaperSwitch.switchChanged), for: UIControl.Event.valueChanged)
100 | }
101 |
102 | override open func layoutSubviews() {
103 |
104 | if let parentView = self.parentView {
105 | let x:CGFloat = max(center.x, parentView.frame.size.width - frame.midX)
106 | let y:CGFloat = max(center.y, parentView.frame.size.height - frame.midY)
107 | radius = sqrt(x*x + y*y)
108 | }
109 |
110 | let additional = parentView == superview ? CGPoint.zero : (superview?.frame.origin ?? CGPoint.zero)
111 |
112 | shape.frame = CGRect(x: center.x - radius + additional.x - 2, y: center.y - radius + additional.y, width: radius * 2, height: radius * 2)
113 | shape.anchorPoint = CGPoint(x: 0.5, y: 0.5)
114 | shape.path = UIBezierPath(ovalIn: CGRect(x: 0, y: 0, width: radius * 2, height: radius * 2)).cgPath
115 | }
116 |
117 | // MARK: - Public
118 | open override func setOn(_ on: Bool, animated: Bool) {
119 | let changed:Bool = on != self.isOn
120 |
121 | super.setOn(on, animated: animated)
122 |
123 | if changed {
124 | switchChangeWithAnimation(animated)
125 | }
126 | }
127 |
128 | // MARK: - Private
129 | fileprivate func showShapeIfNeed() {
130 | shape.transform = isOn ? CATransform3DMakeScale(1.0, 1.0, 1.0) : CATransform3DMakeScale(0.0001, 0.0001, 0.0001)
131 | }
132 |
133 | @objc internal func switchChanged() {
134 | switchChangeWithAnimation(true)
135 | }
136 |
137 | // MARK: - Animations
138 | fileprivate func animateKeyPath(_ keyPath: String, fromValue from: CGFloat?, toValue to: CGFloat, timing timingFunction: String) -> CABasicAnimation {
139 |
140 | let animation:CABasicAnimation = CABasicAnimation(keyPath: keyPath)
141 |
142 | animation.fromValue = from
143 | animation.toValue = to
144 | animation.repeatCount = 1
145 | animation.timingFunction = CAMediaTimingFunction(name: convertToCAMediaTimingFunctionName(timingFunction))
146 | animation.isRemovedOnCompletion = false
147 | animation.fillMode = CAMediaTimingFillMode.forwards
148 | animation.duration = duration
149 | animation.delegate = self
150 |
151 | return animation
152 | }
153 |
154 | fileprivate func switchChangeWithAnimation(_ animation: Bool) {
155 | guard let onTintColor = self.onTintColor else {
156 | return
157 | }
158 |
159 | shape.fillColor = onTintColor.cgColor
160 |
161 | if isOn {
162 | let scaleAnimation:CABasicAnimation = animateKeyPath(Constants.scale,
163 | fromValue: 0.01,
164 | toValue: 1.0,
165 | timing:convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeIn));
166 | if animation == false { scaleAnimation.duration = 0.0001 }
167 |
168 | shape.add(scaleAnimation, forKey: Constants.up)
169 | } else {
170 | let scaleAnimation:CABasicAnimation = animateKeyPath(Constants.scale,
171 | fromValue: 1.0,
172 | toValue: 0.01,
173 | timing:convertFromCAMediaTimingFunctionName(CAMediaTimingFunctionName.easeOut));
174 | if animation == false { scaleAnimation.duration = 0.0001 }
175 |
176 | shape.add(scaleAnimation, forKey: Constants.down)
177 | }
178 | }
179 |
180 | //MARK: - CAAnimation Delegate
181 | open func animationDidStart(_ anim: CAAnimation) {
182 | parentView?.backgroundColor = defaultTintColor
183 | animationDidStartClosure(isOn)
184 | }
185 |
186 | open func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
187 | if flag == true {
188 | parentView?.backgroundColor = isOn == true ? onTintColor : defaultTintColor
189 | }
190 |
191 | animationDidStopClosure(isOn, flag)
192 | }
193 | }
194 |
195 | // Helper function inserted by Swift 4.2 migrator.
196 | fileprivate func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
197 | return CAMediaTimingFunctionName(rawValue: input)
198 | }
199 |
200 | // Helper function inserted by Swift 4.2 migrator.
201 | fileprivate func convertFromCAMediaTimingFunctionName(_ input: CAMediaTimingFunctionName) -> String {
202 | return input.rawValue
203 | }
204 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitch/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitch/PaperSwitch.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaperSwitch.h
3 | // PaperSwitch
4 | //
5 | // Created by Alex K. on 01/06/16.
6 | // Copyright © 2016 Ramotion. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for PaperSwitch.
12 | FOUNDATION_EXPORT double PaperSwitchVersionNumber;
13 |
14 | //! Project version string for PaperSwitch.
15 | FOUNDATION_EXPORT const unsigned char PaperSwitchVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 154E67C21D8AA47900E85781 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 154E67C11D8AA47900E85781 /* Main.storyboard */; };
11 | 846E0ED31C464B5C0052CDD8 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 846E0ED21C464B5C0052CDD8 /* Launch.storyboard */; };
12 | 84BE57D51CFF03ED0073C92B /* PaperSwitch.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BE57D41CFF03ED0073C92B /* PaperSwitch.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 84BE57D91CFF03ED0073C92B /* PaperSwitch.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84BE57D21CFF03ED0073C92B /* PaperSwitch.framework */; };
14 | 84BE57DA1CFF03ED0073C92B /* PaperSwitch.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84BE57D21CFF03ED0073C92B /* PaperSwitch.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 84BE57DF1CFF04000073C92B /* RAMPaperSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C688A221A274A39008BFF1E /* RAMPaperSwitch.swift */; };
16 | 9C688A001A274993008BFF1E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C6889FF1A274993008BFF1E /* AppDelegate.swift */; };
17 | 9C688A021A274993008BFF1E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C688A011A274993008BFF1E /* ViewController.swift */; };
18 | 9C688A071A274993008BFF1E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9C688A061A274993008BFF1E /* Images.xcassets */; };
19 | 9C688A161A274993008BFF1E /* PaperSwitchDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C688A151A274993008BFF1E /* PaperSwitchDemoTests.swift */; };
20 | 9C688A231A274A39008BFF1E /* RAMPaperSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C688A221A274A39008BFF1E /* RAMPaperSwitch.swift */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXContainerItemProxy section */
24 | 84BE57D71CFF03ED0073C92B /* PBXContainerItemProxy */ = {
25 | isa = PBXContainerItemProxy;
26 | containerPortal = 9C6889F21A274993008BFF1E /* Project object */;
27 | proxyType = 1;
28 | remoteGlobalIDString = 84BE57D11CFF03ED0073C92B;
29 | remoteInfo = PaperSwitch;
30 | };
31 | 9C688A101A274993008BFF1E /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = 9C6889F21A274993008BFF1E /* Project object */;
34 | proxyType = 1;
35 | remoteGlobalIDString = 9C6889F91A274993008BFF1E;
36 | remoteInfo = PaperSwitchDemo;
37 | };
38 | /* End PBXContainerItemProxy section */
39 |
40 | /* Begin PBXCopyFilesBuildPhase section */
41 | 84BE57DE1CFF03ED0073C92B /* Embed Frameworks */ = {
42 | isa = PBXCopyFilesBuildPhase;
43 | buildActionMask = 2147483647;
44 | dstPath = "";
45 | dstSubfolderSpec = 10;
46 | files = (
47 | 84BE57DA1CFF03ED0073C92B /* PaperSwitch.framework in Embed Frameworks */,
48 | );
49 | name = "Embed Frameworks";
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 154E67C11D8AA47900E85781 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
56 | 158583FB1D8A9C4E00175A4D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
57 | 158583FD1D8A9C9700175A4D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
58 | 846E0ED21C464B5C0052CDD8 /* Launch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Launch.storyboard; sourceTree = ""; };
59 | 84BE57D21CFF03ED0073C92B /* PaperSwitch.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PaperSwitch.framework; sourceTree = BUILT_PRODUCTS_DIR; };
60 | 84BE57D41CFF03ED0073C92B /* PaperSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaperSwitch.h; sourceTree = ""; };
61 | 84BE57D61CFF03ED0073C92B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
62 | 9C6889FA1A274993008BFF1E /* PaperSwitchDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PaperSwitchDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
63 | 9C6889FE1A274993008BFF1E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | 9C6889FF1A274993008BFF1E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
65 | 9C688A011A274993008BFF1E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
66 | 9C688A061A274993008BFF1E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
67 | 9C688A0F1A274993008BFF1E /* PaperSwitchDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PaperSwitchDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
68 | 9C688A141A274993008BFF1E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
69 | 9C688A151A274993008BFF1E /* PaperSwitchDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaperSwitchDemoTests.swift; sourceTree = ""; };
70 | 9C688A221A274A39008BFF1E /* RAMPaperSwitch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RAMPaperSwitch.swift; sourceTree = ""; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 84BE57CE1CFF03ED0073C92B /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | 9C6889F71A274993008BFF1E /* Frameworks */ = {
82 | isa = PBXFrameworksBuildPhase;
83 | buildActionMask = 2147483647;
84 | files = (
85 | 84BE57D91CFF03ED0073C92B /* PaperSwitch.framework in Frameworks */,
86 | );
87 | runOnlyForDeploymentPostprocessing = 0;
88 | };
89 | 9C688A0C1A274993008BFF1E /* Frameworks */ = {
90 | isa = PBXFrameworksBuildPhase;
91 | buildActionMask = 2147483647;
92 | files = (
93 | );
94 | runOnlyForDeploymentPostprocessing = 0;
95 | };
96 | /* End PBXFrameworksBuildPhase section */
97 |
98 | /* Begin PBXGroup section */
99 | 158583FA1D8A9C4E00175A4D /* Frameworks */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 158583FD1D8A9C9700175A4D /* QuartzCore.framework */,
103 | 158583FB1D8A9C4E00175A4D /* CoreGraphics.framework */,
104 | );
105 | name = Frameworks;
106 | sourceTree = "";
107 | };
108 | 84BE57D31CFF03ED0073C92B /* PaperSwitch */ = {
109 | isa = PBXGroup;
110 | children = (
111 | 84BE57D41CFF03ED0073C92B /* PaperSwitch.h */,
112 | 84BE57D61CFF03ED0073C92B /* Info.plist */,
113 | );
114 | path = PaperSwitch;
115 | sourceTree = "";
116 | };
117 | 9C6889F11A274993008BFF1E = {
118 | isa = PBXGroup;
119 | children = (
120 | 9C6889FC1A274993008BFF1E /* PaperSwitchDemo */,
121 | 9C688A121A274993008BFF1E /* PaperSwitchDemoTests */,
122 | 84BE57D31CFF03ED0073C92B /* PaperSwitch */,
123 | 9C6889FB1A274993008BFF1E /* Products */,
124 | 158583FA1D8A9C4E00175A4D /* Frameworks */,
125 | );
126 | sourceTree = "";
127 | };
128 | 9C6889FB1A274993008BFF1E /* Products */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 9C6889FA1A274993008BFF1E /* PaperSwitchDemo.app */,
132 | 9C688A0F1A274993008BFF1E /* PaperSwitchDemoTests.xctest */,
133 | 84BE57D21CFF03ED0073C92B /* PaperSwitch.framework */,
134 | );
135 | name = Products;
136 | sourceTree = "";
137 | };
138 | 9C6889FC1A274993008BFF1E /* PaperSwitchDemo */ = {
139 | isa = PBXGroup;
140 | children = (
141 | 9C688A211A274A39008BFF1E /* PaperSwitch */,
142 | 9C6889FF1A274993008BFF1E /* AppDelegate.swift */,
143 | 9C688A011A274993008BFF1E /* ViewController.swift */,
144 | 9C688A061A274993008BFF1E /* Images.xcassets */,
145 | 9C6889FD1A274993008BFF1E /* Supporting Files */,
146 | 846E0ED21C464B5C0052CDD8 /* Launch.storyboard */,
147 | 154E67C11D8AA47900E85781 /* Main.storyboard */,
148 | );
149 | path = PaperSwitchDemo;
150 | sourceTree = "";
151 | };
152 | 9C6889FD1A274993008BFF1E /* Supporting Files */ = {
153 | isa = PBXGroup;
154 | children = (
155 | 9C6889FE1A274993008BFF1E /* Info.plist */,
156 | );
157 | name = "Supporting Files";
158 | sourceTree = "";
159 | };
160 | 9C688A121A274993008BFF1E /* PaperSwitchDemoTests */ = {
161 | isa = PBXGroup;
162 | children = (
163 | 9C688A151A274993008BFF1E /* PaperSwitchDemoTests.swift */,
164 | 9C688A131A274993008BFF1E /* Supporting Files */,
165 | );
166 | path = PaperSwitchDemoTests;
167 | sourceTree = "";
168 | };
169 | 9C688A131A274993008BFF1E /* Supporting Files */ = {
170 | isa = PBXGroup;
171 | children = (
172 | 9C688A141A274993008BFF1E /* Info.plist */,
173 | );
174 | name = "Supporting Files";
175 | sourceTree = "";
176 | };
177 | 9C688A211A274A39008BFF1E /* PaperSwitch */ = {
178 | isa = PBXGroup;
179 | children = (
180 | 9C688A221A274A39008BFF1E /* RAMPaperSwitch.swift */,
181 | );
182 | name = PaperSwitch;
183 | path = ../../PaperSwitch;
184 | sourceTree = "";
185 | };
186 | /* End PBXGroup section */
187 |
188 | /* Begin PBXHeadersBuildPhase section */
189 | 84BE57CF1CFF03ED0073C92B /* Headers */ = {
190 | isa = PBXHeadersBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | 84BE57D51CFF03ED0073C92B /* PaperSwitch.h in Headers */,
194 | );
195 | runOnlyForDeploymentPostprocessing = 0;
196 | };
197 | /* End PBXHeadersBuildPhase section */
198 |
199 | /* Begin PBXNativeTarget section */
200 | 84BE57D11CFF03ED0073C92B /* PaperSwitch */ = {
201 | isa = PBXNativeTarget;
202 | buildConfigurationList = 84BE57DD1CFF03ED0073C92B /* Build configuration list for PBXNativeTarget "PaperSwitch" */;
203 | buildPhases = (
204 | 84BE57CD1CFF03ED0073C92B /* Sources */,
205 | 84BE57CE1CFF03ED0073C92B /* Frameworks */,
206 | 84BE57CF1CFF03ED0073C92B /* Headers */,
207 | 84BE57D01CFF03ED0073C92B /* Resources */,
208 | );
209 | buildRules = (
210 | );
211 | dependencies = (
212 | );
213 | name = PaperSwitch;
214 | productName = PaperSwitch;
215 | productReference = 84BE57D21CFF03ED0073C92B /* PaperSwitch.framework */;
216 | productType = "com.apple.product-type.framework";
217 | };
218 | 9C6889F91A274993008BFF1E /* PaperSwitchDemo */ = {
219 | isa = PBXNativeTarget;
220 | buildConfigurationList = 9C688A191A274993008BFF1E /* Build configuration list for PBXNativeTarget "PaperSwitchDemo" */;
221 | buildPhases = (
222 | 9C6889F61A274993008BFF1E /* Sources */,
223 | 9C6889F71A274993008BFF1E /* Frameworks */,
224 | 9C6889F81A274993008BFF1E /* Resources */,
225 | 84BE57DE1CFF03ED0073C92B /* Embed Frameworks */,
226 | );
227 | buildRules = (
228 | );
229 | dependencies = (
230 | 84BE57D81CFF03ED0073C92B /* PBXTargetDependency */,
231 | );
232 | name = PaperSwitchDemo;
233 | productName = PaperSwitchDemo;
234 | productReference = 9C6889FA1A274993008BFF1E /* PaperSwitchDemo.app */;
235 | productType = "com.apple.product-type.application";
236 | };
237 | 9C688A0E1A274993008BFF1E /* PaperSwitchDemoTests */ = {
238 | isa = PBXNativeTarget;
239 | buildConfigurationList = 9C688A1C1A274993008BFF1E /* Build configuration list for PBXNativeTarget "PaperSwitchDemoTests" */;
240 | buildPhases = (
241 | 9C688A0B1A274993008BFF1E /* Sources */,
242 | 9C688A0C1A274993008BFF1E /* Frameworks */,
243 | 9C688A0D1A274993008BFF1E /* Resources */,
244 | );
245 | buildRules = (
246 | );
247 | dependencies = (
248 | 9C688A111A274993008BFF1E /* PBXTargetDependency */,
249 | );
250 | name = PaperSwitchDemoTests;
251 | productName = PaperSwitchDemoTests;
252 | productReference = 9C688A0F1A274993008BFF1E /* PaperSwitchDemoTests.xctest */;
253 | productType = "com.apple.product-type.bundle.unit-test";
254 | };
255 | /* End PBXNativeTarget section */
256 |
257 | /* Begin PBXProject section */
258 | 9C6889F21A274993008BFF1E /* Project object */ = {
259 | isa = PBXProject;
260 | attributes = {
261 | LastSwiftMigration = 0700;
262 | LastSwiftUpdateCheck = 0700;
263 | LastUpgradeCheck = 1020;
264 | ORGANIZATIONNAME = Ramotion;
265 | TargetAttributes = {
266 | 84BE57D11CFF03ED0073C92B = {
267 | CreatedOnToolsVersion = 7.3.1;
268 | DevelopmentTeam = 34MUF9YXTA;
269 | LastSwiftMigration = 1020;
270 | };
271 | 9C6889F91A274993008BFF1E = {
272 | CreatedOnToolsVersion = 6.1;
273 | LastSwiftMigration = 1020;
274 | ProvisioningStyle = Manual;
275 | };
276 | 9C688A0E1A274993008BFF1E = {
277 | CreatedOnToolsVersion = 6.1;
278 | LastSwiftMigration = 1020;
279 | TestTargetID = 9C6889F91A274993008BFF1E;
280 | };
281 | };
282 | };
283 | buildConfigurationList = 9C6889F51A274993008BFF1E /* Build configuration list for PBXProject "PaperSwitchDemo" */;
284 | compatibilityVersion = "Xcode 3.2";
285 | developmentRegion = en;
286 | hasScannedForEncodings = 0;
287 | knownRegions = (
288 | en,
289 | Base,
290 | );
291 | mainGroup = 9C6889F11A274993008BFF1E;
292 | productRefGroup = 9C6889FB1A274993008BFF1E /* Products */;
293 | projectDirPath = "";
294 | projectRoot = "";
295 | targets = (
296 | 9C6889F91A274993008BFF1E /* PaperSwitchDemo */,
297 | 9C688A0E1A274993008BFF1E /* PaperSwitchDemoTests */,
298 | 84BE57D11CFF03ED0073C92B /* PaperSwitch */,
299 | );
300 | };
301 | /* End PBXProject section */
302 |
303 | /* Begin PBXResourcesBuildPhase section */
304 | 84BE57D01CFF03ED0073C92B /* Resources */ = {
305 | isa = PBXResourcesBuildPhase;
306 | buildActionMask = 2147483647;
307 | files = (
308 | );
309 | runOnlyForDeploymentPostprocessing = 0;
310 | };
311 | 9C6889F81A274993008BFF1E /* Resources */ = {
312 | isa = PBXResourcesBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | 9C688A071A274993008BFF1E /* Images.xcassets in Resources */,
316 | 846E0ED31C464B5C0052CDD8 /* Launch.storyboard in Resources */,
317 | 154E67C21D8AA47900E85781 /* Main.storyboard in Resources */,
318 | );
319 | runOnlyForDeploymentPostprocessing = 0;
320 | };
321 | 9C688A0D1A274993008BFF1E /* Resources */ = {
322 | isa = PBXResourcesBuildPhase;
323 | buildActionMask = 2147483647;
324 | files = (
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | };
328 | /* End PBXResourcesBuildPhase section */
329 |
330 | /* Begin PBXSourcesBuildPhase section */
331 | 84BE57CD1CFF03ED0073C92B /* Sources */ = {
332 | isa = PBXSourcesBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | 84BE57DF1CFF04000073C92B /* RAMPaperSwitch.swift in Sources */,
336 | );
337 | runOnlyForDeploymentPostprocessing = 0;
338 | };
339 | 9C6889F61A274993008BFF1E /* Sources */ = {
340 | isa = PBXSourcesBuildPhase;
341 | buildActionMask = 2147483647;
342 | files = (
343 | 9C688A021A274993008BFF1E /* ViewController.swift in Sources */,
344 | 9C688A231A274A39008BFF1E /* RAMPaperSwitch.swift in Sources */,
345 | 9C688A001A274993008BFF1E /* AppDelegate.swift in Sources */,
346 | );
347 | runOnlyForDeploymentPostprocessing = 0;
348 | };
349 | 9C688A0B1A274993008BFF1E /* Sources */ = {
350 | isa = PBXSourcesBuildPhase;
351 | buildActionMask = 2147483647;
352 | files = (
353 | 9C688A161A274993008BFF1E /* PaperSwitchDemoTests.swift in Sources */,
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | };
357 | /* End PBXSourcesBuildPhase section */
358 |
359 | /* Begin PBXTargetDependency section */
360 | 84BE57D81CFF03ED0073C92B /* PBXTargetDependency */ = {
361 | isa = PBXTargetDependency;
362 | target = 84BE57D11CFF03ED0073C92B /* PaperSwitch */;
363 | targetProxy = 84BE57D71CFF03ED0073C92B /* PBXContainerItemProxy */;
364 | };
365 | 9C688A111A274993008BFF1E /* PBXTargetDependency */ = {
366 | isa = PBXTargetDependency;
367 | target = 9C6889F91A274993008BFF1E /* PaperSwitchDemo */;
368 | targetProxy = 9C688A101A274993008BFF1E /* PBXContainerItemProxy */;
369 | };
370 | /* End PBXTargetDependency section */
371 |
372 | /* Begin XCBuildConfiguration section */
373 | 84BE57DB1CFF03ED0073C92B /* Debug */ = {
374 | isa = XCBuildConfiguration;
375 | buildSettings = {
376 | CLANG_ANALYZER_NONNULL = YES;
377 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
378 | CURRENT_PROJECT_VERSION = 1;
379 | DEBUG_INFORMATION_FORMAT = dwarf;
380 | DEFINES_MODULE = YES;
381 | DEVELOPMENT_TEAM = 34MUF9YXTA;
382 | DYLIB_COMPATIBILITY_VERSION = 1;
383 | DYLIB_CURRENT_VERSION = 1;
384 | DYLIB_INSTALL_NAME_BASE = "@rpath";
385 | GCC_NO_COMMON_BLOCKS = YES;
386 | INFOPLIST_FILE = PaperSwitch/Info.plist;
387 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
388 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
389 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
390 | PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PaperSwitch;
391 | PRODUCT_NAME = "$(TARGET_NAME)";
392 | SKIP_INSTALL = YES;
393 | SWIFT_VERSION = 5.0;
394 | VERSIONING_SYSTEM = "apple-generic";
395 | VERSION_INFO_PREFIX = "";
396 | };
397 | name = Debug;
398 | };
399 | 84BE57DC1CFF03ED0073C92B /* Release */ = {
400 | isa = XCBuildConfiguration;
401 | buildSettings = {
402 | CLANG_ANALYZER_NONNULL = YES;
403 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
404 | COPY_PHASE_STRIP = NO;
405 | CURRENT_PROJECT_VERSION = 1;
406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
407 | DEFINES_MODULE = YES;
408 | DYLIB_COMPATIBILITY_VERSION = 1;
409 | DYLIB_CURRENT_VERSION = 1;
410 | DYLIB_INSTALL_NAME_BASE = "@rpath";
411 | GCC_NO_COMMON_BLOCKS = YES;
412 | INFOPLIST_FILE = PaperSwitch/Info.plist;
413 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
414 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
415 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
416 | PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PaperSwitch;
417 | PRODUCT_NAME = "$(TARGET_NAME)";
418 | SKIP_INSTALL = YES;
419 | SWIFT_VERSION = 5.0;
420 | VERSIONING_SYSTEM = "apple-generic";
421 | VERSION_INFO_PREFIX = "";
422 | };
423 | name = Release;
424 | };
425 | 9C688A171A274993008BFF1E /* Debug */ = {
426 | isa = XCBuildConfiguration;
427 | buildSettings = {
428 | ALWAYS_SEARCH_USER_PATHS = NO;
429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
430 | CLANG_CXX_LIBRARY = "libc++";
431 | CLANG_ENABLE_MODULES = YES;
432 | CLANG_ENABLE_OBJC_ARC = YES;
433 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
434 | CLANG_WARN_BOOL_CONVERSION = YES;
435 | CLANG_WARN_COMMA = YES;
436 | CLANG_WARN_CONSTANT_CONVERSION = YES;
437 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
438 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
439 | CLANG_WARN_EMPTY_BODY = YES;
440 | CLANG_WARN_ENUM_CONVERSION = YES;
441 | CLANG_WARN_INFINITE_RECURSION = YES;
442 | CLANG_WARN_INT_CONVERSION = YES;
443 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
444 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
445 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
446 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
448 | CLANG_WARN_STRICT_PROTOTYPES = YES;
449 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
450 | CLANG_WARN_UNREACHABLE_CODE = YES;
451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
452 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
453 | COPY_PHASE_STRIP = NO;
454 | ENABLE_STRICT_OBJC_MSGSEND = YES;
455 | ENABLE_TESTABILITY = YES;
456 | GCC_C_LANGUAGE_STANDARD = gnu99;
457 | GCC_DYNAMIC_NO_PIC = NO;
458 | GCC_NO_COMMON_BLOCKS = YES;
459 | GCC_OPTIMIZATION_LEVEL = 0;
460 | GCC_PREPROCESSOR_DEFINITIONS = (
461 | "DEBUG=1",
462 | "$(inherited)",
463 | );
464 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
465 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
466 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
467 | GCC_WARN_UNDECLARED_SELECTOR = YES;
468 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
469 | GCC_WARN_UNUSED_FUNCTION = YES;
470 | GCC_WARN_UNUSED_VARIABLE = YES;
471 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
472 | MTL_ENABLE_DEBUG_INFO = YES;
473 | ONLY_ACTIVE_ARCH = YES;
474 | SDKROOT = iphoneos;
475 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
476 | SWIFT_VERSION = 4.0;
477 | TARGETED_DEVICE_FAMILY = "1,2";
478 | };
479 | name = Debug;
480 | };
481 | 9C688A181A274993008BFF1E /* Release */ = {
482 | isa = XCBuildConfiguration;
483 | buildSettings = {
484 | ALWAYS_SEARCH_USER_PATHS = NO;
485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
486 | CLANG_CXX_LIBRARY = "libc++";
487 | CLANG_ENABLE_MODULES = YES;
488 | CLANG_ENABLE_OBJC_ARC = YES;
489 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
490 | CLANG_WARN_BOOL_CONVERSION = YES;
491 | CLANG_WARN_COMMA = YES;
492 | CLANG_WARN_CONSTANT_CONVERSION = YES;
493 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
494 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
495 | CLANG_WARN_EMPTY_BODY = YES;
496 | CLANG_WARN_ENUM_CONVERSION = YES;
497 | CLANG_WARN_INFINITE_RECURSION = YES;
498 | CLANG_WARN_INT_CONVERSION = YES;
499 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
500 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
501 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
502 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
503 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
504 | CLANG_WARN_STRICT_PROTOTYPES = YES;
505 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
506 | CLANG_WARN_UNREACHABLE_CODE = YES;
507 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
508 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
509 | COPY_PHASE_STRIP = YES;
510 | ENABLE_NS_ASSERTIONS = NO;
511 | ENABLE_STRICT_OBJC_MSGSEND = YES;
512 | GCC_C_LANGUAGE_STANDARD = gnu99;
513 | GCC_NO_COMMON_BLOCKS = YES;
514 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
515 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
516 | GCC_WARN_UNDECLARED_SELECTOR = YES;
517 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
518 | GCC_WARN_UNUSED_FUNCTION = YES;
519 | GCC_WARN_UNUSED_VARIABLE = YES;
520 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
521 | MTL_ENABLE_DEBUG_INFO = NO;
522 | SDKROOT = iphoneos;
523 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
524 | SWIFT_VERSION = 4.0;
525 | TARGETED_DEVICE_FAMILY = "1,2";
526 | VALIDATE_PRODUCT = YES;
527 | };
528 | name = Release;
529 | };
530 | 9C688A1A1A274993008BFF1E /* Debug */ = {
531 | isa = XCBuildConfiguration;
532 | buildSettings = {
533 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
534 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
535 | DEVELOPMENT_TEAM = "";
536 | INFOPLIST_FILE = PaperSwitchDemo/Info.plist;
537 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
538 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
539 | PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
540 | PRODUCT_NAME = "$(TARGET_NAME)";
541 | SWIFT_VERSION = 5.0;
542 | };
543 | name = Debug;
544 | };
545 | 9C688A1B1A274993008BFF1E /* Release */ = {
546 | isa = XCBuildConfiguration;
547 | buildSettings = {
548 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
549 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
550 | DEVELOPMENT_TEAM = "";
551 | INFOPLIST_FILE = PaperSwitchDemo/Info.plist;
552 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
553 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
554 | PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
555 | PRODUCT_NAME = "$(TARGET_NAME)";
556 | SWIFT_VERSION = 5.0;
557 | };
558 | name = Release;
559 | };
560 | 9C688A1D1A274993008BFF1E /* Debug */ = {
561 | isa = XCBuildConfiguration;
562 | buildSettings = {
563 | BUNDLE_LOADER = "$(TEST_HOST)";
564 | FRAMEWORK_SEARCH_PATHS = (
565 | "$(SDKROOT)/Developer/Library/Frameworks",
566 | "$(inherited)",
567 | );
568 | GCC_PREPROCESSOR_DEFINITIONS = (
569 | "DEBUG=1",
570 | "$(inherited)",
571 | );
572 | INFOPLIST_FILE = PaperSwitchDemoTests/Info.plist;
573 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
574 | PRODUCT_BUNDLE_IDENTIFIER = "ramotion.$(PRODUCT_NAME:rfc1034identifier)";
575 | PRODUCT_NAME = "$(TARGET_NAME)";
576 | SWIFT_VERSION = 5.0;
577 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PaperSwitchDemo.app/PaperSwitchDemo";
578 | };
579 | name = Debug;
580 | };
581 | 9C688A1E1A274993008BFF1E /* Release */ = {
582 | isa = XCBuildConfiguration;
583 | buildSettings = {
584 | BUNDLE_LOADER = "$(TEST_HOST)";
585 | FRAMEWORK_SEARCH_PATHS = (
586 | "$(SDKROOT)/Developer/Library/Frameworks",
587 | "$(inherited)",
588 | );
589 | INFOPLIST_FILE = PaperSwitchDemoTests/Info.plist;
590 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
591 | PRODUCT_BUNDLE_IDENTIFIER = "ramotion.$(PRODUCT_NAME:rfc1034identifier)";
592 | PRODUCT_NAME = "$(TARGET_NAME)";
593 | SWIFT_VERSION = 5.0;
594 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PaperSwitchDemo.app/PaperSwitchDemo";
595 | };
596 | name = Release;
597 | };
598 | /* End XCBuildConfiguration section */
599 |
600 | /* Begin XCConfigurationList section */
601 | 84BE57DD1CFF03ED0073C92B /* Build configuration list for PBXNativeTarget "PaperSwitch" */ = {
602 | isa = XCConfigurationList;
603 | buildConfigurations = (
604 | 84BE57DB1CFF03ED0073C92B /* Debug */,
605 | 84BE57DC1CFF03ED0073C92B /* Release */,
606 | );
607 | defaultConfigurationIsVisible = 0;
608 | defaultConfigurationName = Release;
609 | };
610 | 9C6889F51A274993008BFF1E /* Build configuration list for PBXProject "PaperSwitchDemo" */ = {
611 | isa = XCConfigurationList;
612 | buildConfigurations = (
613 | 9C688A171A274993008BFF1E /* Debug */,
614 | 9C688A181A274993008BFF1E /* Release */,
615 | );
616 | defaultConfigurationIsVisible = 0;
617 | defaultConfigurationName = Release;
618 | };
619 | 9C688A191A274993008BFF1E /* Build configuration list for PBXNativeTarget "PaperSwitchDemo" */ = {
620 | isa = XCConfigurationList;
621 | buildConfigurations = (
622 | 9C688A1A1A274993008BFF1E /* Debug */,
623 | 9C688A1B1A274993008BFF1E /* Release */,
624 | );
625 | defaultConfigurationIsVisible = 0;
626 | defaultConfigurationName = Release;
627 | };
628 | 9C688A1C1A274993008BFF1E /* Build configuration list for PBXNativeTarget "PaperSwitchDemoTests" */ = {
629 | isa = XCConfigurationList;
630 | buildConfigurations = (
631 | 9C688A1D1A274993008BFF1E /* Debug */,
632 | 9C688A1E1A274993008BFF1E /* Release */,
633 | );
634 | defaultConfigurationIsVisible = 0;
635 | defaultConfigurationName = Release;
636 | };
637 | /* End XCConfigurationList section */
638 | };
639 | rootObject = 9C6889F21A274993008BFF1E /* Project object */;
640 | }
641 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo.xcodeproj/xcshareddata/xcschemes/PaperSwitch.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | // AppDelegate.swift
2 | //
3 | // Copyright (c) 26/11/14 Ramotion Inc. (http://ramotion.com)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | import UIKit
24 |
25 | @UIApplicationMain
26 | class AppDelegate: UIResponder, UIApplicationDelegate {
27 |
28 | var window: UIWindow?
29 |
30 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
31 | return true
32 | }
33 | }
34 |
35 |
36 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "8.0",
8 | "subtype" : "736h",
9 | "scale" : "3x"
10 | },
11 | {
12 | "orientation" : "landscape",
13 | "idiom" : "iphone",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "8.0",
16 | "subtype" : "736h",
17 | "scale" : "3x"
18 | },
19 | {
20 | "orientation" : "portrait",
21 | "idiom" : "iphone",
22 | "extent" : "full-screen",
23 | "minimum-system-version" : "8.0",
24 | "subtype" : "667h",
25 | "scale" : "2x"
26 | },
27 | {
28 | "orientation" : "portrait",
29 | "idiom" : "iphone",
30 | "extent" : "full-screen",
31 | "minimum-system-version" : "7.0",
32 | "scale" : "2x"
33 | },
34 | {
35 | "orientation" : "portrait",
36 | "idiom" : "iphone",
37 | "extent" : "full-screen",
38 | "minimum-system-version" : "7.0",
39 | "subtype" : "retina4",
40 | "scale" : "2x"
41 | },
42 | {
43 | "orientation" : "portrait",
44 | "idiom" : "ipad",
45 | "extent" : "full-screen",
46 | "minimum-system-version" : "7.0",
47 | "scale" : "1x"
48 | },
49 | {
50 | "orientation" : "portrait",
51 | "idiom" : "ipad",
52 | "extent" : "full-screen",
53 | "minimum-system-version" : "7.0",
54 | "scale" : "2x"
55 | }
56 | ],
57 | "info" : {
58 | "version" : 1,
59 | "author" : "xcode"
60 | }
61 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/btn_next.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "next.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/btn_next.imageset/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/btn_next.imageset/next.png
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_off.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "phone_off.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_off.imageset/phone_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_off.imageset/phone_off.png
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_on.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "phone_on.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_on.imageset/phone_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_phone_on.imageset/phone_on.png
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "users1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users1.imageset/users1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users1.imageset/users1.png
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "users2.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users2.imageset/users2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/PaperSwitchDemo/PaperSwitchDemo/Images.xcassets/img_users2.imageset/users2.png
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | Launch
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 | UIInterfaceOrientationPortraitUpsideDown
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Launch.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | All your phone Contacts will be automatically
43 | added to your friends list.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | // ViewController.swift
2 | //
3 | // Copyright (c) 26/11/14 Ramotion Inc. (http://ramotion.com)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | import UIKit
24 |
25 | class ViewController: UIViewController {
26 |
27 | @IBOutlet weak var connectContactsLabel: UILabel!
28 | @IBOutlet weak var phone1ImageView: UIImageView!
29 | @IBOutlet weak var paperSwitch1: RAMPaperSwitch!
30 |
31 | @IBOutlet weak var allowDiscoveryLabel: UILabel!
32 | @IBOutlet weak var phone2ImageView: UIImageView!
33 | @IBOutlet weak var paperSwitch2: RAMPaperSwitch!
34 |
35 | override func viewDidLoad() {
36 | super.viewDidLoad()
37 |
38 | self.setupPaperSwitch()
39 |
40 | self.navigationController?.isNavigationBarHidden = true
41 | }
42 |
43 | fileprivate func setupPaperSwitch() {
44 |
45 | self.paperSwitch1.animationDidStartClosure = {(onAnimation: Bool) in
46 |
47 | self.animateLabel(self.connectContactsLabel, onAnimation: onAnimation, duration: self.paperSwitch1.duration)
48 | self.animateImageView(self.phone1ImageView, onAnimation: onAnimation, duration: self.paperSwitch1.duration)
49 | }
50 |
51 |
52 | self.paperSwitch2.animationDidStartClosure = {(onAnimation: Bool) in
53 |
54 | self.animateLabel(self.self.allowDiscoveryLabel, onAnimation: onAnimation, duration: self.paperSwitch2.duration)
55 | self.animateImageView(self.phone2ImageView, onAnimation: onAnimation, duration: self.paperSwitch2.duration)
56 | }
57 | }
58 |
59 | fileprivate func animateLabel(_ label: UILabel, onAnimation: Bool, duration: TimeInterval) {
60 | UIView.transition(with: label, duration: duration, options: UIView.AnimationOptions.transitionCrossDissolve, animations: {
61 | label.textColor = onAnimation ? UIColor.white : UIColor(red: 31/255.0, green: 183/255.0, blue: 252/255.0, alpha: 1)
62 | }, completion:nil)
63 | }
64 |
65 | fileprivate func animateImageView(_ imageView: UIImageView, onAnimation: Bool, duration: TimeInterval) {
66 | UIView.transition(with: imageView, duration: duration, options: UIView.AnimationOptions.transitionCrossDissolve, animations: {
67 | imageView.image = UIImage(named: onAnimation ? "img_phone_on" : "img_phone_off")
68 | }, completion:nil)
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/PaperSwitchDemo/PaperSwitchDemoTests/PaperSwitchDemoTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PaperSwitchDemoTests.swift
3 | // PaperSwitchDemoTests
4 | //
5 | // Created by Ramotion on 27/11/14.
6 | // Copyright (c) 2014 Ramotion. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class PaperSwitchDemoTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RAMPaperSwitch.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 | s.name = 'RAMPaperSwitch'
4 | s.version = '3.1.0'
5 | s.summary = 'Swift subclass of the UISwitch which paints over the parent view'
6 | s.homepage = 'https://github.com/Ramotion/paper-switch'
7 | s.license = 'MIT'
8 | s.author = { 'juri.v' => 'juri.v@ramotion.com' }
9 | s.source = { :git => 'https://github.com/Ramotion/paper-switch.git', :tag => s.version.to_s }
10 | s.ios.deployment_target = '9.0'
11 | s.source_files = 'PaperSwitch/*.swift'
12 | end
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
PAPER SWITCH
7 |
8 | A Swift material design UI module which paints over the parent view when the switch is on.
9 |
10 |
11 | ___
12 |
13 |
14 |
15 |
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
16 |
17 |
18 |
19 |
Stay tuned for the latest updates:
20 |
21 |
22 |
23 |
24 |
25 | [](https://cocoapods.org/pods/RAMPaperSwitch)
26 | [](http://cocoapods.org/pods/RAMPaperSwitch)
27 | [](https://cdn.rawgit.com/Ramotion/paper-switch/master/docs/index.html)
28 | [](https://github.com/Ramotion/paper-switch)
29 | [](http://twitter.com/Ramotion)
30 | [](https://travis-ci.org/Ramotion/paper-switch)
31 | [](https://paypal.me/Ramotion)
32 |
33 | ## Requirements
34 |
35 | - iOS 8.0+
36 | - Xcode 9.0+
37 |
38 | # Installation
39 |
40 | Just add the `RAMPaperSwitch` folder to your project.
41 |
42 | or use [CocoaPods](https://cocoapods.org) with Podfile:
43 | ``` ruby
44 | pod 'RAMPaperSwitch'
45 | ```
46 | or [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:
47 | ```
48 | github "Ramotion/paper-switch"
49 | ```
50 |
51 |
52 | # Usage
53 | RAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the `onTintColor` property of the switch, and it will automatically _paint over_ its superview with the selected color.
54 | You have ability to set duration of animation instead of default value.
55 |
56 | 1. Create a new UISwitch in your storyboard or nib.
57 |
58 | 2. Set the class of the UISwitch to RAMPaperSwitch in your Storyboard or nib.
59 |
60 | 3. Set `onTintColor` for the switch
61 |
62 | 4. Set `duration` property programmatically if You want to change animation duration.
63 |
64 | 5. Add animation for other views near the switch if need.
65 |
66 |
67 | # Animate views
68 | You can animate other views near the switch. For example, you can change color to views or labels that are inside the same superview. Duration of animation can be gotten from the RAMPaperSwitch's property `duration`. You can animate CoreAnimation properties like this:
69 |
70 | ``` swift
71 | self.paperSwitch.animationDidStartClosure = {(onAnimation: Bool) in
72 | UIView.transitionWithView(self.label, duration: self.paperSwitch.duration, options: UIViewAnimationOptions.TransitionCrossDissolve, animations: {
73 | self.label.textColor = onAnimation ? UIColor.whiteColor() : UIColor.blueColor()
74 | }, completion:nil)
75 | }
76 | ```
77 |
78 |
79 |
80 | ## 📄 License
81 |
82 | Paper Switch is released under the MIT license.
83 | See [LICENSE](./LICENSE) for details.
84 |
85 | This library is a part of a selection of our best UI open-source projects.
86 |
87 | If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
88 |
89 | ## 📱 Get the Showroom App for iOS to give it a try
90 | Try this UI component and more like this in our iOS app. Contact us if interested.
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/docs/Classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Classes Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 | PaperSwitchDemo Reference
22 |
23 | Classes Reference
24 |
25 |
26 |
27 |
39 |
40 |
41 |
42 | Classes
43 | The following classes are available globally.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
57 |
58 |
59 |
60 |
61 |
62 |
Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.
63 |
64 |
See more
65 |
66 |
67 |
Declaration
68 |
69 |
Swift
70 |
public class RAMPaperSwitch : UISwitch
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/docs/Classes/RAMPaperSwitch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RAMPaperSwitch Class Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 | PaperSwitchDemo Reference
23 |
24 | RAMPaperSwitch Class Reference
25 |
26 |
27 |
28 |
40 |
41 |
42 |
43 | RAMPaperSwitch
44 |
45 |
46 |
public class RAMPaperSwitch : UISwitch
47 |
48 |
49 |
50 | Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
65 |
66 |
67 |
68 |
69 |
The total duration of the animations, measured in seconds. Default 0.35
70 |
71 |
72 |
73 |
Declaration
74 |
75 |
Swift
76 |
@IBInspectable public var duration : Double = 0.35
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
92 |
93 |
94 |
95 |
96 |
Closuer call when animation start
97 |
98 |
99 |
100 |
Declaration
101 |
102 |
Swift
103 |
public var animationDidStartClosure = {( onAnimation : Bool ) -> Void in }
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
118 |
119 |
120 |
121 |
122 |
123 |
Closuer call when animation finish
124 |
125 |
126 |
127 |
Declaration
128 |
129 |
Swift
130 |
public var animationDidStopClosure = {( onAnimation : Bool , finished : Bool ) -> Void in }
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
147 |
148 |
149 |
156 |
157 |
158 |
159 |
160 |
161 |
Returns an initialized switch object.
162 |
163 |
164 |
165 |
Declaration
166 |
167 |
Swift
168 |
public required init ( view : UIView ?, color : UIColor ?)
169 |
170 |
171 |
172 |
173 |
Parameters
174 |
175 |
176 |
177 |
178 |
179 | view
180 |
181 |
182 |
183 |
184 |
animatable view
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 | color
193 |
194 |
195 |
196 |
197 |
The color which fill view.
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
Return Value
207 |
An initialized UISwitch object.
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
221 |
222 |
223 |
224 |
225 |
226 |
--------------------------------------------------------------------------------
/docs/css/highlight.css:
--------------------------------------------------------------------------------
1 | /* Credit to https://gist.github.com/wataru420/2048287 */
2 | .highlight {
3 | /* Comment */
4 | /* Error */
5 | /* Keyword */
6 | /* Operator */
7 | /* Comment.Multiline */
8 | /* Comment.Preproc */
9 | /* Comment.Single */
10 | /* Comment.Special */
11 | /* Generic.Deleted */
12 | /* Generic.Deleted.Specific */
13 | /* Generic.Emph */
14 | /* Generic.Error */
15 | /* Generic.Heading */
16 | /* Generic.Inserted */
17 | /* Generic.Inserted.Specific */
18 | /* Generic.Output */
19 | /* Generic.Prompt */
20 | /* Generic.Strong */
21 | /* Generic.Subheading */
22 | /* Generic.Traceback */
23 | /* Keyword.Constant */
24 | /* Keyword.Declaration */
25 | /* Keyword.Pseudo */
26 | /* Keyword.Reserved */
27 | /* Keyword.Type */
28 | /* Literal.Number */
29 | /* Literal.String */
30 | /* Name.Attribute */
31 | /* Name.Builtin */
32 | /* Name.Class */
33 | /* Name.Constant */
34 | /* Name.Entity */
35 | /* Name.Exception */
36 | /* Name.Function */
37 | /* Name.Namespace */
38 | /* Name.Tag */
39 | /* Name.Variable */
40 | /* Operator.Word */
41 | /* Text.Whitespace */
42 | /* Literal.Number.Float */
43 | /* Literal.Number.Hex */
44 | /* Literal.Number.Integer */
45 | /* Literal.Number.Oct */
46 | /* Literal.String.Backtick */
47 | /* Literal.String.Char */
48 | /* Literal.String.Doc */
49 | /* Literal.String.Double */
50 | /* Literal.String.Escape */
51 | /* Literal.String.Heredoc */
52 | /* Literal.String.Interpol */
53 | /* Literal.String.Other */
54 | /* Literal.String.Regex */
55 | /* Literal.String.Single */
56 | /* Literal.String.Symbol */
57 | /* Name.Builtin.Pseudo */
58 | /* Name.Variable.Class */
59 | /* Name.Variable.Global */
60 | /* Name.Variable.Instance */
61 | /* Literal.Number.Integer.Long */ }
62 | .highlight .c {
63 | color: #999988;
64 | font-style: italic; }
65 | .highlight .err {
66 | color: #a61717;
67 | background-color: #e3d2d2; }
68 | .highlight .k {
69 | color: #000000;
70 | font-weight: bold; }
71 | .highlight .o {
72 | color: #000000;
73 | font-weight: bold; }
74 | .highlight .cm {
75 | color: #999988;
76 | font-style: italic; }
77 | .highlight .cp {
78 | color: #999999;
79 | font-weight: bold; }
80 | .highlight .c1 {
81 | color: #999988;
82 | font-style: italic; }
83 | .highlight .cs {
84 | color: #999999;
85 | font-weight: bold;
86 | font-style: italic; }
87 | .highlight .gd {
88 | color: #000000;
89 | background-color: #ffdddd; }
90 | .highlight .gd .x {
91 | color: #000000;
92 | background-color: #ffaaaa; }
93 | .highlight .ge {
94 | color: #000000;
95 | font-style: italic; }
96 | .highlight .gr {
97 | color: #aa0000; }
98 | .highlight .gh {
99 | color: #999999; }
100 | .highlight .gi {
101 | color: #000000;
102 | background-color: #ddffdd; }
103 | .highlight .gi .x {
104 | color: #000000;
105 | background-color: #aaffaa; }
106 | .highlight .go {
107 | color: #888888; }
108 | .highlight .gp {
109 | color: #555555; }
110 | .highlight .gs {
111 | font-weight: bold; }
112 | .highlight .gu {
113 | color: #aaaaaa; }
114 | .highlight .gt {
115 | color: #aa0000; }
116 | .highlight .kc {
117 | color: #000000;
118 | font-weight: bold; }
119 | .highlight .kd {
120 | color: #000000;
121 | font-weight: bold; }
122 | .highlight .kp {
123 | color: #000000;
124 | font-weight: bold; }
125 | .highlight .kr {
126 | color: #000000;
127 | font-weight: bold; }
128 | .highlight .kt {
129 | color: #445588; }
130 | .highlight .m {
131 | color: #009999; }
132 | .highlight .s {
133 | color: #d14; }
134 | .highlight .na {
135 | color: #008080; }
136 | .highlight .nb {
137 | color: #0086B3; }
138 | .highlight .nc {
139 | color: #445588;
140 | font-weight: bold; }
141 | .highlight .no {
142 | color: #008080; }
143 | .highlight .ni {
144 | color: #800080; }
145 | .highlight .ne {
146 | color: #990000;
147 | font-weight: bold; }
148 | .highlight .nf {
149 | color: #990000; }
150 | .highlight .nn {
151 | color: #555555; }
152 | .highlight .nt {
153 | color: #000080; }
154 | .highlight .nv {
155 | color: #008080; }
156 | .highlight .ow {
157 | color: #000000;
158 | font-weight: bold; }
159 | .highlight .w {
160 | color: #bbbbbb; }
161 | .highlight .mf {
162 | color: #009999; }
163 | .highlight .mh {
164 | color: #009999; }
165 | .highlight .mi {
166 | color: #009999; }
167 | .highlight .mo {
168 | color: #009999; }
169 | .highlight .sb {
170 | color: #d14; }
171 | .highlight .sc {
172 | color: #d14; }
173 | .highlight .sd {
174 | color: #d14; }
175 | .highlight .s2 {
176 | color: #d14; }
177 | .highlight .se {
178 | color: #d14; }
179 | .highlight .sh {
180 | color: #d14; }
181 | .highlight .si {
182 | color: #d14; }
183 | .highlight .sx {
184 | color: #d14; }
185 | .highlight .sr {
186 | color: #009926; }
187 | .highlight .s1 {
188 | color: #d14; }
189 | .highlight .ss {
190 | color: #990073; }
191 | .highlight .bp {
192 | color: #999999; }
193 | .highlight .vc {
194 | color: #008080; }
195 | .highlight .vg {
196 | color: #008080; }
197 | .highlight .vi {
198 | color: #008080; }
199 | .highlight .il {
200 | color: #009999; }
201 |
--------------------------------------------------------------------------------
/docs/css/jazzy.css:
--------------------------------------------------------------------------------
1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
2 | background: transparent;
3 | border: 0;
4 | margin: 0;
5 | outline: 0;
6 | padding: 0;
7 | vertical-align: baseline; }
8 |
9 | body {
10 | background-color: #f2f2f2;
11 | font-family: Helvetica, freesans, Arial, sans-serif;
12 | font-size: 14px;
13 | -webkit-font-smoothing: subpixel-antialiased;
14 | word-wrap: break-word; }
15 |
16 | h1, h2, h3 {
17 | margin-top: 0.8em;
18 | margin-bottom: 0.3em;
19 | font-weight: 100;
20 | color: black; }
21 |
22 | h1 {
23 | font-size: 2.5em; }
24 |
25 | h2 {
26 | font-size: 2em;
27 | border-bottom: 1px solid #e2e2e2; }
28 |
29 | h4 {
30 | font-size: 13px;
31 | line-height: 1.5;
32 | margin-top: 21px; }
33 |
34 | h5 {
35 | font-size: 1.1em; }
36 |
37 | h6 {
38 | font-size: 1.1em;
39 | color: #777; }
40 |
41 | .section-name {
42 | color: gray;
43 | display: block;
44 | font-family: Helvetica;
45 | font-size: 22px;
46 | font-weight: 100;
47 | margin-bottom: 15px; }
48 |
49 | pre, code {
50 | font: 0.95em Menlo, monospace;
51 | color: #777;
52 | word-wrap: normal; }
53 |
54 | p code, li code {
55 | background-color: #eee;
56 | padding: 2px 4px;
57 | border-radius: 4px; }
58 |
59 | a {
60 | color: #0088cc;
61 | text-decoration: none; }
62 |
63 | ul {
64 | padding-left: 15px; }
65 |
66 | li {
67 | line-height: 1.8em; }
68 |
69 | img {
70 | max-width: 100%; }
71 |
72 | blockquote {
73 | margin-left: 0;
74 | padding: 0 10px;
75 | border-left: 4px solid #ccc; }
76 |
77 | .content-wrapper {
78 | margin: 0 auto;
79 | width: 980px; }
80 |
81 | header {
82 | font-size: 0.85em;
83 | line-height: 26px;
84 | background-color: #414141;
85 | position: fixed;
86 | width: 100%;
87 | z-index: 1; }
88 | header img {
89 | padding-right: 6px;
90 | vertical-align: -4px;
91 | height: 16px; }
92 | header a {
93 | color: #fff; }
94 | header p {
95 | float: left;
96 | color: #999; }
97 | header .header-right {
98 | float: right;
99 | margin-left: 16px; }
100 |
101 | #breadcrumbs {
102 | background-color: #f2f2f2;
103 | height: 27px;
104 | padding-top: 17px;
105 | position: fixed;
106 | width: 100%;
107 | z-index: 1;
108 | margin-top: 26px; }
109 | #breadcrumbs #carat {
110 | height: 10px;
111 | margin: 0 5px; }
112 |
113 | .sidebar {
114 | background-color: #f9f9f9;
115 | border: 1px solid #e2e2e2;
116 | overflow-y: auto;
117 | overflow-x: hidden;
118 | position: fixed;
119 | top: 70px;
120 | bottom: 0;
121 | width: 230px;
122 | word-wrap: normal; }
123 |
124 | .nav-groups {
125 | list-style-type: none;
126 | background: #fff;
127 | padding-left: 0; }
128 |
129 | .nav-group-name {
130 | border-bottom: 1px solid #e2e2e2;
131 | font-size: 1.1em;
132 | font-weight: 100;
133 | padding: 15px 0 15px 20px; }
134 | .nav-group-name > a {
135 | color: #333; }
136 |
137 | .nav-group-tasks {
138 | margin-top: 5px; }
139 |
140 | .nav-group-task {
141 | font-size: 0.9em;
142 | list-style-type: none; }
143 | .nav-group-task a {
144 | color: #888; }
145 |
146 | .main-content {
147 | background-color: #fff;
148 | border: 1px solid #e2e2e2;
149 | margin-left: 246px;
150 | position: absolute;
151 | overflow: hidden;
152 | padding-bottom: 60px;
153 | top: 70px;
154 | width: 734px; }
155 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
156 | margin-bottom: 1em; }
157 | .main-content p {
158 | line-height: 1.8em; }
159 | .main-content section .section:first-child {
160 | margin-top: 0;
161 | padding-top: 0; }
162 | .main-content section .task-group-section .task-group:first-of-type {
163 | padding-top: 10px; }
164 | .main-content section .task-group-section .task-group:first-of-type .section-name {
165 | padding-top: 15px; }
166 |
167 | .section {
168 | padding: 0 25px; }
169 |
170 | .highlight {
171 | background-color: #eee;
172 | padding: 10px 12px;
173 | border: 1px solid #e2e2e2;
174 | border-radius: 4px;
175 | overflow-x: auto; }
176 |
177 | .declaration .highlight {
178 | overflow-x: initial;
179 | padding: 0 40px 40px 0;
180 | margin-bottom: -25px;
181 | background-color: transparent;
182 | border: none; }
183 |
184 | .section-name {
185 | margin: 0;
186 | margin-left: 18px; }
187 |
188 | .task-group-section {
189 | padding-left: 6px;
190 | border-top: 1px solid #e2e2e2; }
191 |
192 | .task-group {
193 | padding-top: 0px; }
194 |
195 | .task-name-container a[name]:before {
196 | content: "";
197 | display: block;
198 | padding-top: 70px;
199 | margin: -70px 0 0; }
200 |
201 | .item {
202 | padding-top: 8px;
203 | width: 100%;
204 | list-style-type: none; }
205 | .item a[name]:before {
206 | content: "";
207 | display: block;
208 | padding-top: 70px;
209 | margin: -70px 0 0; }
210 | .item code {
211 | background-color: transparent;
212 | padding: 0; }
213 | .item .token {
214 | padding-left: 3px;
215 | margin-left: 15px;
216 | font-size: 11.9px; }
217 | .item .declaration-note {
218 | font-size: .85em;
219 | color: gray;
220 | font-style: italic; }
221 |
222 | .pointer-container {
223 | border-bottom: 1px solid #e2e2e2;
224 | left: -23px;
225 | padding-bottom: 13px;
226 | position: relative;
227 | width: 110%; }
228 |
229 | .pointer {
230 | background: #f9f9f9;
231 | border-left: 1px solid #e2e2e2;
232 | border-top: 1px solid #e2e2e2;
233 | height: 12px;
234 | left: 21px;
235 | top: -7px;
236 | -webkit-transform: rotate(45deg);
237 | -moz-transform: rotate(45deg);
238 | -o-transform: rotate(45deg);
239 | transform: rotate(45deg);
240 | position: absolute;
241 | width: 12px; }
242 |
243 | .height-container {
244 | display: none;
245 | left: -25px;
246 | padding: 0 25px;
247 | position: relative;
248 | width: 100%;
249 | overflow: hidden; }
250 | .height-container .section {
251 | background: #f9f9f9;
252 | border-bottom: 1px solid #e2e2e2;
253 | left: -25px;
254 | position: relative;
255 | width: 100%;
256 | padding-top: 10px;
257 | padding-bottom: 5px; }
258 |
259 | .aside, .language {
260 | padding: 6px 12px;
261 | margin: 12px 0;
262 | border-left: 5px solid #dddddd;
263 | overflow-y: hidden; }
264 | .aside .aside-title, .language .aside-title {
265 | font-size: 9px;
266 | letter-spacing: 2px;
267 | text-transform: uppercase;
268 | padding-bottom: 0;
269 | margin: 0;
270 | color: #aaa;
271 | -webkit-user-select: none; }
272 | .aside p:last-child, .language p:last-child {
273 | margin-bottom: 0; }
274 |
275 | .language {
276 | border-left: 5px solid #cde9f4; }
277 | .language .aside-title {
278 | color: #4b8afb; }
279 |
280 | .aside-warning {
281 | border-left: 5px solid #ff6666; }
282 | .aside-warning .aside-title {
283 | color: #ff0000; }
284 |
285 | .graybox {
286 | border-collapse: collapse;
287 | width: 100%; }
288 | .graybox p {
289 | margin: 0;
290 | word-break: break-word;
291 | min-width: 50px; }
292 | .graybox td {
293 | border: 1px solid #e2e2e2;
294 | padding: 5px 25px 5px 10px;
295 | vertical-align: middle; }
296 | .graybox tr td:first-of-type {
297 | text-align: right;
298 | padding: 7px;
299 | vertical-align: top;
300 | word-break: normal;
301 | width: 40px; }
302 |
303 | .slightly-smaller {
304 | font-size: 0.9em; }
305 |
306 | #footer {
307 | position: absolute;
308 | bottom: 10px;
309 | margin-left: 25px; }
310 | #footer p {
311 | margin: 0;
312 | color: #aaa;
313 | font-size: 0.8em; }
314 |
315 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
316 | display: none; }
317 | html.dash .main-content {
318 | width: 980px;
319 | margin-left: 0;
320 | border: none;
321 | width: 100%;
322 | top: 0;
323 | padding-bottom: 0; }
324 | html.dash .height-container {
325 | display: block; }
326 | html.dash .item .token {
327 | margin-left: 0; }
328 | html.dash .content-wrapper {
329 | width: auto; }
330 | html.dash #footer {
331 | position: static; }
332 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleIdentifier
6 | com.jazzy.paperswitchdemo
7 | CFBundleName
8 | PaperSwitchDemo
9 | DocSetPlatformFamily
10 | jazzy
11 | isDashDocset
12 |
13 | dashIndexFilePath
14 | index.html
15 | isJavaScriptEnabled
16 |
17 | DashDocSetFamily
18 | dashtoc
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/Classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Classes Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 | PaperSwitchDemo Reference
22 |
23 | Classes Reference
24 |
25 |
26 |
27 |
39 |
40 |
41 |
42 | Classes
43 | The following classes are available globally.
44 |
45 |
46 |
47 |
48 |
49 |
50 |
57 |
58 |
59 |
60 |
61 |
62 |
Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.
63 |
64 |
See more
65 |
66 |
67 |
Declaration
68 |
69 |
Swift
70 |
public class RAMPaperSwitch : UISwitch
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/Classes/RAMPaperSwitch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | RAMPaperSwitch Class Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
21 |
22 | PaperSwitchDemo Reference
23 |
24 | RAMPaperSwitch Class Reference
25 |
26 |
27 |
28 |
40 |
41 |
42 |
43 | RAMPaperSwitch
44 |
45 |
46 |
public class RAMPaperSwitch : UISwitch
47 |
48 |
49 |
50 | Swift subclass of the UISwitch which paints over the parent view with the onTintColor when the switch is turned on.
51 |
52 |
53 |
54 |
55 |
56 |
57 |
64 |
65 |
66 |
67 |
68 |
69 |
The total duration of the animations, measured in seconds. Default 0.35
70 |
71 |
72 |
73 |
Declaration
74 |
75 |
Swift
76 |
@IBInspectable public var duration : Double = 0.35
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
91 |
92 |
93 |
94 |
95 |
96 |
Closuer call when animation start
97 |
98 |
99 |
100 |
Declaration
101 |
102 |
Swift
103 |
public var animationDidStartClosure = {( onAnimation : Bool ) -> Void in }
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
118 |
119 |
120 |
121 |
122 |
123 |
Closuer call when animation finish
124 |
125 |
126 |
127 |
Declaration
128 |
129 |
Swift
130 |
public var animationDidStopClosure = {( onAnimation : Bool , finished : Bool ) -> Void in }
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
147 |
148 |
149 |
156 |
157 |
158 |
159 |
160 |
161 |
Returns an initialized switch object.
162 |
163 |
164 |
165 |
Declaration
166 |
167 |
Swift
168 |
public required init ( view : UIView ?, color : UIColor ?)
169 |
170 |
171 |
172 |
173 |
Parameters
174 |
175 |
176 |
177 |
178 |
179 | view
180 |
181 |
182 |
183 |
184 |
animatable view
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 | color
193 |
194 |
195 |
196 |
197 |
The color which fill view.
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
Return Value
207 |
An initialized UISwitch object.
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
221 |
222 |
223 |
224 |
225 |
226 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/css/highlight.css:
--------------------------------------------------------------------------------
1 | /* Credit to https://gist.github.com/wataru420/2048287 */
2 | .highlight {
3 | /* Comment */
4 | /* Error */
5 | /* Keyword */
6 | /* Operator */
7 | /* Comment.Multiline */
8 | /* Comment.Preproc */
9 | /* Comment.Single */
10 | /* Comment.Special */
11 | /* Generic.Deleted */
12 | /* Generic.Deleted.Specific */
13 | /* Generic.Emph */
14 | /* Generic.Error */
15 | /* Generic.Heading */
16 | /* Generic.Inserted */
17 | /* Generic.Inserted.Specific */
18 | /* Generic.Output */
19 | /* Generic.Prompt */
20 | /* Generic.Strong */
21 | /* Generic.Subheading */
22 | /* Generic.Traceback */
23 | /* Keyword.Constant */
24 | /* Keyword.Declaration */
25 | /* Keyword.Pseudo */
26 | /* Keyword.Reserved */
27 | /* Keyword.Type */
28 | /* Literal.Number */
29 | /* Literal.String */
30 | /* Name.Attribute */
31 | /* Name.Builtin */
32 | /* Name.Class */
33 | /* Name.Constant */
34 | /* Name.Entity */
35 | /* Name.Exception */
36 | /* Name.Function */
37 | /* Name.Namespace */
38 | /* Name.Tag */
39 | /* Name.Variable */
40 | /* Operator.Word */
41 | /* Text.Whitespace */
42 | /* Literal.Number.Float */
43 | /* Literal.Number.Hex */
44 | /* Literal.Number.Integer */
45 | /* Literal.Number.Oct */
46 | /* Literal.String.Backtick */
47 | /* Literal.String.Char */
48 | /* Literal.String.Doc */
49 | /* Literal.String.Double */
50 | /* Literal.String.Escape */
51 | /* Literal.String.Heredoc */
52 | /* Literal.String.Interpol */
53 | /* Literal.String.Other */
54 | /* Literal.String.Regex */
55 | /* Literal.String.Single */
56 | /* Literal.String.Symbol */
57 | /* Name.Builtin.Pseudo */
58 | /* Name.Variable.Class */
59 | /* Name.Variable.Global */
60 | /* Name.Variable.Instance */
61 | /* Literal.Number.Integer.Long */ }
62 | .highlight .c {
63 | color: #999988;
64 | font-style: italic; }
65 | .highlight .err {
66 | color: #a61717;
67 | background-color: #e3d2d2; }
68 | .highlight .k {
69 | color: #000000;
70 | font-weight: bold; }
71 | .highlight .o {
72 | color: #000000;
73 | font-weight: bold; }
74 | .highlight .cm {
75 | color: #999988;
76 | font-style: italic; }
77 | .highlight .cp {
78 | color: #999999;
79 | font-weight: bold; }
80 | .highlight .c1 {
81 | color: #999988;
82 | font-style: italic; }
83 | .highlight .cs {
84 | color: #999999;
85 | font-weight: bold;
86 | font-style: italic; }
87 | .highlight .gd {
88 | color: #000000;
89 | background-color: #ffdddd; }
90 | .highlight .gd .x {
91 | color: #000000;
92 | background-color: #ffaaaa; }
93 | .highlight .ge {
94 | color: #000000;
95 | font-style: italic; }
96 | .highlight .gr {
97 | color: #aa0000; }
98 | .highlight .gh {
99 | color: #999999; }
100 | .highlight .gi {
101 | color: #000000;
102 | background-color: #ddffdd; }
103 | .highlight .gi .x {
104 | color: #000000;
105 | background-color: #aaffaa; }
106 | .highlight .go {
107 | color: #888888; }
108 | .highlight .gp {
109 | color: #555555; }
110 | .highlight .gs {
111 | font-weight: bold; }
112 | .highlight .gu {
113 | color: #aaaaaa; }
114 | .highlight .gt {
115 | color: #aa0000; }
116 | .highlight .kc {
117 | color: #000000;
118 | font-weight: bold; }
119 | .highlight .kd {
120 | color: #000000;
121 | font-weight: bold; }
122 | .highlight .kp {
123 | color: #000000;
124 | font-weight: bold; }
125 | .highlight .kr {
126 | color: #000000;
127 | font-weight: bold; }
128 | .highlight .kt {
129 | color: #445588; }
130 | .highlight .m {
131 | color: #009999; }
132 | .highlight .s {
133 | color: #d14; }
134 | .highlight .na {
135 | color: #008080; }
136 | .highlight .nb {
137 | color: #0086B3; }
138 | .highlight .nc {
139 | color: #445588;
140 | font-weight: bold; }
141 | .highlight .no {
142 | color: #008080; }
143 | .highlight .ni {
144 | color: #800080; }
145 | .highlight .ne {
146 | color: #990000;
147 | font-weight: bold; }
148 | .highlight .nf {
149 | color: #990000; }
150 | .highlight .nn {
151 | color: #555555; }
152 | .highlight .nt {
153 | color: #000080; }
154 | .highlight .nv {
155 | color: #008080; }
156 | .highlight .ow {
157 | color: #000000;
158 | font-weight: bold; }
159 | .highlight .w {
160 | color: #bbbbbb; }
161 | .highlight .mf {
162 | color: #009999; }
163 | .highlight .mh {
164 | color: #009999; }
165 | .highlight .mi {
166 | color: #009999; }
167 | .highlight .mo {
168 | color: #009999; }
169 | .highlight .sb {
170 | color: #d14; }
171 | .highlight .sc {
172 | color: #d14; }
173 | .highlight .sd {
174 | color: #d14; }
175 | .highlight .s2 {
176 | color: #d14; }
177 | .highlight .se {
178 | color: #d14; }
179 | .highlight .sh {
180 | color: #d14; }
181 | .highlight .si {
182 | color: #d14; }
183 | .highlight .sx {
184 | color: #d14; }
185 | .highlight .sr {
186 | color: #009926; }
187 | .highlight .s1 {
188 | color: #d14; }
189 | .highlight .ss {
190 | color: #990073; }
191 | .highlight .bp {
192 | color: #999999; }
193 | .highlight .vc {
194 | color: #008080; }
195 | .highlight .vg {
196 | color: #008080; }
197 | .highlight .vi {
198 | color: #008080; }
199 | .highlight .il {
200 | color: #009999; }
201 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/css/jazzy.css:
--------------------------------------------------------------------------------
1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
2 | background: transparent;
3 | border: 0;
4 | margin: 0;
5 | outline: 0;
6 | padding: 0;
7 | vertical-align: baseline; }
8 |
9 | body {
10 | background-color: #f2f2f2;
11 | font-family: Helvetica, freesans, Arial, sans-serif;
12 | font-size: 14px;
13 | -webkit-font-smoothing: subpixel-antialiased;
14 | word-wrap: break-word; }
15 |
16 | h1, h2, h3 {
17 | margin-top: 0.8em;
18 | margin-bottom: 0.3em;
19 | font-weight: 100;
20 | color: black; }
21 |
22 | h1 {
23 | font-size: 2.5em; }
24 |
25 | h2 {
26 | font-size: 2em;
27 | border-bottom: 1px solid #e2e2e2; }
28 |
29 | h4 {
30 | font-size: 13px;
31 | line-height: 1.5;
32 | margin-top: 21px; }
33 |
34 | h5 {
35 | font-size: 1.1em; }
36 |
37 | h6 {
38 | font-size: 1.1em;
39 | color: #777; }
40 |
41 | .section-name {
42 | color: gray;
43 | display: block;
44 | font-family: Helvetica;
45 | font-size: 22px;
46 | font-weight: 100;
47 | margin-bottom: 15px; }
48 |
49 | pre, code {
50 | font: 0.95em Menlo, monospace;
51 | color: #777;
52 | word-wrap: normal; }
53 |
54 | p code, li code {
55 | background-color: #eee;
56 | padding: 2px 4px;
57 | border-radius: 4px; }
58 |
59 | a {
60 | color: #0088cc;
61 | text-decoration: none; }
62 |
63 | ul {
64 | padding-left: 15px; }
65 |
66 | li {
67 | line-height: 1.8em; }
68 |
69 | img {
70 | max-width: 100%; }
71 |
72 | blockquote {
73 | margin-left: 0;
74 | padding: 0 10px;
75 | border-left: 4px solid #ccc; }
76 |
77 | .content-wrapper {
78 | margin: 0 auto;
79 | width: 980px; }
80 |
81 | header {
82 | font-size: 0.85em;
83 | line-height: 26px;
84 | background-color: #414141;
85 | position: fixed;
86 | width: 100%;
87 | z-index: 1; }
88 | header img {
89 | padding-right: 6px;
90 | vertical-align: -4px;
91 | height: 16px; }
92 | header a {
93 | color: #fff; }
94 | header p {
95 | float: left;
96 | color: #999; }
97 | header .header-right {
98 | float: right;
99 | margin-left: 16px; }
100 |
101 | #breadcrumbs {
102 | background-color: #f2f2f2;
103 | height: 27px;
104 | padding-top: 17px;
105 | position: fixed;
106 | width: 100%;
107 | z-index: 1;
108 | margin-top: 26px; }
109 | #breadcrumbs #carat {
110 | height: 10px;
111 | margin: 0 5px; }
112 |
113 | .sidebar {
114 | background-color: #f9f9f9;
115 | border: 1px solid #e2e2e2;
116 | overflow-y: auto;
117 | overflow-x: hidden;
118 | position: fixed;
119 | top: 70px;
120 | bottom: 0;
121 | width: 230px;
122 | word-wrap: normal; }
123 |
124 | .nav-groups {
125 | list-style-type: none;
126 | background: #fff;
127 | padding-left: 0; }
128 |
129 | .nav-group-name {
130 | border-bottom: 1px solid #e2e2e2;
131 | font-size: 1.1em;
132 | font-weight: 100;
133 | padding: 15px 0 15px 20px; }
134 | .nav-group-name > a {
135 | color: #333; }
136 |
137 | .nav-group-tasks {
138 | margin-top: 5px; }
139 |
140 | .nav-group-task {
141 | font-size: 0.9em;
142 | list-style-type: none; }
143 | .nav-group-task a {
144 | color: #888; }
145 |
146 | .main-content {
147 | background-color: #fff;
148 | border: 1px solid #e2e2e2;
149 | margin-left: 246px;
150 | position: absolute;
151 | overflow: hidden;
152 | padding-bottom: 60px;
153 | top: 70px;
154 | width: 734px; }
155 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
156 | margin-bottom: 1em; }
157 | .main-content p {
158 | line-height: 1.8em; }
159 | .main-content section .section:first-child {
160 | margin-top: 0;
161 | padding-top: 0; }
162 | .main-content section .task-group-section .task-group:first-of-type {
163 | padding-top: 10px; }
164 | .main-content section .task-group-section .task-group:first-of-type .section-name {
165 | padding-top: 15px; }
166 |
167 | .section {
168 | padding: 0 25px; }
169 |
170 | .highlight {
171 | background-color: #eee;
172 | padding: 10px 12px;
173 | border: 1px solid #e2e2e2;
174 | border-radius: 4px;
175 | overflow-x: auto; }
176 |
177 | .declaration .highlight {
178 | overflow-x: initial;
179 | padding: 0 40px 40px 0;
180 | margin-bottom: -25px;
181 | background-color: transparent;
182 | border: none; }
183 |
184 | .section-name {
185 | margin: 0;
186 | margin-left: 18px; }
187 |
188 | .task-group-section {
189 | padding-left: 6px;
190 | border-top: 1px solid #e2e2e2; }
191 |
192 | .task-group {
193 | padding-top: 0px; }
194 |
195 | .task-name-container a[name]:before {
196 | content: "";
197 | display: block;
198 | padding-top: 70px;
199 | margin: -70px 0 0; }
200 |
201 | .item {
202 | padding-top: 8px;
203 | width: 100%;
204 | list-style-type: none; }
205 | .item a[name]:before {
206 | content: "";
207 | display: block;
208 | padding-top: 70px;
209 | margin: -70px 0 0; }
210 | .item code {
211 | background-color: transparent;
212 | padding: 0; }
213 | .item .token {
214 | padding-left: 3px;
215 | margin-left: 15px;
216 | font-size: 11.9px; }
217 | .item .declaration-note {
218 | font-size: .85em;
219 | color: gray;
220 | font-style: italic; }
221 |
222 | .pointer-container {
223 | border-bottom: 1px solid #e2e2e2;
224 | left: -23px;
225 | padding-bottom: 13px;
226 | position: relative;
227 | width: 110%; }
228 |
229 | .pointer {
230 | background: #f9f9f9;
231 | border-left: 1px solid #e2e2e2;
232 | border-top: 1px solid #e2e2e2;
233 | height: 12px;
234 | left: 21px;
235 | top: -7px;
236 | -webkit-transform: rotate(45deg);
237 | -moz-transform: rotate(45deg);
238 | -o-transform: rotate(45deg);
239 | transform: rotate(45deg);
240 | position: absolute;
241 | width: 12px; }
242 |
243 | .height-container {
244 | display: none;
245 | left: -25px;
246 | padding: 0 25px;
247 | position: relative;
248 | width: 100%;
249 | overflow: hidden; }
250 | .height-container .section {
251 | background: #f9f9f9;
252 | border-bottom: 1px solid #e2e2e2;
253 | left: -25px;
254 | position: relative;
255 | width: 100%;
256 | padding-top: 10px;
257 | padding-bottom: 5px; }
258 |
259 | .aside, .language {
260 | padding: 6px 12px;
261 | margin: 12px 0;
262 | border-left: 5px solid #dddddd;
263 | overflow-y: hidden; }
264 | .aside .aside-title, .language .aside-title {
265 | font-size: 9px;
266 | letter-spacing: 2px;
267 | text-transform: uppercase;
268 | padding-bottom: 0;
269 | margin: 0;
270 | color: #aaa;
271 | -webkit-user-select: none; }
272 | .aside p:last-child, .language p:last-child {
273 | margin-bottom: 0; }
274 |
275 | .language {
276 | border-left: 5px solid #cde9f4; }
277 | .language .aside-title {
278 | color: #4b8afb; }
279 |
280 | .aside-warning {
281 | border-left: 5px solid #ff6666; }
282 | .aside-warning .aside-title {
283 | color: #ff0000; }
284 |
285 | .graybox {
286 | border-collapse: collapse;
287 | width: 100%; }
288 | .graybox p {
289 | margin: 0;
290 | word-break: break-word;
291 | min-width: 50px; }
292 | .graybox td {
293 | border: 1px solid #e2e2e2;
294 | padding: 5px 25px 5px 10px;
295 | vertical-align: middle; }
296 | .graybox tr td:first-of-type {
297 | text-align: right;
298 | padding: 7px;
299 | vertical-align: top;
300 | word-break: normal;
301 | width: 40px; }
302 |
303 | .slightly-smaller {
304 | font-size: 0.9em; }
305 |
306 | #footer {
307 | position: absolute;
308 | bottom: 10px;
309 | margin-left: 25px; }
310 | #footer p {
311 | margin: 0;
312 | color: #aaa;
313 | font-size: 0.8em; }
314 |
315 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
316 | display: none; }
317 | html.dash .main-content {
318 | width: 980px;
319 | margin-left: 0;
320 | border: none;
321 | width: 100%;
322 | top: 0;
323 | padding-bottom: 0; }
324 | html.dash .height-container {
325 | display: block; }
326 | html.dash .item .token {
327 | margin-left: 0; }
328 | html.dash .content-wrapper {
329 | width: auto; }
330 | html.dash #footer {
331 | position: static; }
332 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/carat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/carat.png
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/dash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/dash.png
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/img/gh.png
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PaperSwitchDemo Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 | PaperSwitchDemo Reference
22 |
23 | PaperSwitchDemo Reference
24 |
25 |
26 |
27 |
39 |
40 |
41 |
42 |
43 |
44 | RAMPaperSwitch
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Swift subclass of the UISwitch which paints over the parent view with the onTintColor
when the switch is turned on. Implemented concept from this Dribbble shot by Ramotion .
54 | Screenshot
55 |
56 |
57 |
58 | The iPhone mockup available here .
59 | Requirements
60 |
61 |
62 | iOS 8.0+
63 | Xcode 6.1
64 |
65 | Installation
66 |
67 | Just add the RAMPaperSwitch
folder to your project.
68 |
69 | or use CocoaPods with Podfile:
70 | ruby
71 | pod 'RAMPaperSwitch'
72 |
73 | or Carthage users can simply add to their Cartfile
:
74 |
75 | github "Ramotion/paper-switch"
76 |
77 | Usage
78 |
79 | RAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the onTintColor
property of the switch, and it will automatically paint over its superview with the selected color.
80 | You have ability to set duration of animation instead of default value.
81 |
82 |
83 | Create a new UISwitch in your storyboard or nib.
84 | Set the class of the UISwitch to RAMPaperSwitch in your Storyboard or nib.
85 | Set onTintColor
for the switch
86 | Set duration
property programmatically if You want to change animation duration.
87 | Add animation for other views near the switch if need.
88 |
89 | Animate views
90 |
91 | You can animate other views near the switch. For example, you can change color to views or labels that are inside the same superview. Duration of animation can be gotten from the RAMPaperSwitch’s property duration
. You can animate CoreAnimation properties like this:
92 | self . paperSwitch . animationDidStartClosure = {( onAnimation : Bool ) in
93 | UIView . transitionWithView ( self . label , duration : self . paperSwitch . duration , options : UIViewAnimationOptions . TransitionCrossDissolve , animations : {
94 | self . label . textColor = onAnimation ? UIColor . whiteColor () : UIColor . blueColor ()
95 | }, completion : nil )
96 | }
97 |
98 | About
99 |
100 | The project maintained by app development agency Ramotion Inc.
101 | See our other open-source projects or hire us to design, develop, and grow your product.
102 |
103 |
104 |
105 |
106 |
107 |
108 |
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/js/jazzy.js:
--------------------------------------------------------------------------------
1 | window.jazzy = {'docset': false}
2 | if (typeof window.dash != 'undefined') {
3 | document.documentElement.className += ' dash'
4 | window.jazzy.docset = true
5 | }
6 | if (navigator.userAgent.match(/xcode/i)) {
7 | document.documentElement.className += ' xcode'
8 | window.jazzy.docset = true
9 | }
10 |
11 | // On doc load, toggle the URL hash discussion if present
12 | $(document).ready(function() {
13 | if (!window.jazzy.docset) {
14 | var linkToHash = $('a[href="' + window.location.hash +'"]');
15 | linkToHash.trigger("click");
16 | }
17 | });
18 |
19 | // On token click, toggle its discussion and animate token.marginLeft
20 | $(".token").click(function(event) {
21 | if (window.jazzy.docset) {
22 | return;
23 | }
24 | var link = $(this);
25 | var animationDuration = 300;
26 | var tokenOffset = "15px";
27 | var original = link.css('marginLeft') == tokenOffset;
28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
29 | $content = link.parent().parent().next();
30 | $content.slideToggle(animationDuration);
31 |
32 | // Keeps the document from jumping to the hash.
33 | var href = $(this).attr('href');
34 | if (history.pushState) {
35 | history.pushState({}, '', href);
36 | } else {
37 | location.hash = href;
38 | }
39 | event.preventDefault();
40 | });
41 |
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/undocumented.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/Documents/undocumented.txt
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/docSet.dsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.docset/Contents/Resources/docSet.dsidx
--------------------------------------------------------------------------------
/docs/docsets/PaperSwitchDemo.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/docsets/PaperSwitchDemo.tgz
--------------------------------------------------------------------------------
/docs/img/carat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/img/carat.png
--------------------------------------------------------------------------------
/docs/img/dash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/img/dash.png
--------------------------------------------------------------------------------
/docs/img/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/img/gh.png
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PaperSwitchDemo Reference
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 | PaperSwitchDemo Reference
22 |
23 | PaperSwitchDemo Reference
24 |
25 |
26 |
27 |
39 |
40 |
41 |
42 |
43 |
44 | RAMPaperSwitch
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Swift subclass of the UISwitch which paints over the parent view with the onTintColor
when the switch is turned on. Implemented concept from this Dribbble shot by Ramotion .
54 | Screenshot
55 |
56 |
57 |
58 | The iPhone mockup available here .
59 | Requirements
60 |
61 |
62 | iOS 8.0+
63 | Xcode 6.1
64 |
65 | Installation
66 |
67 | Just add the RAMPaperSwitch
folder to your project.
68 |
69 | or use CocoaPods with Podfile:
70 | ruby
71 | pod 'RAMPaperSwitch'
72 |
73 | or Carthage users can simply add to their Cartfile
:
74 |
75 | github "Ramotion/paper-switch"
76 |
77 | Usage
78 |
79 | RAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the onTintColor
property of the switch, and it will automatically paint over its superview with the selected color.
80 | You have ability to set duration of animation instead of default value.
81 |
82 |
83 | Create a new UISwitch in your storyboard or nib.
84 | Set the class of the UISwitch to RAMPaperSwitch in your Storyboard or nib.
85 | Set onTintColor
for the switch
86 | Set duration
property programmatically if You want to change animation duration.
87 | Add animation for other views near the switch if need.
88 |
89 | Animate views
90 |
91 | You can animate other views near the switch. For example, you can change color to views or labels that are inside the same superview. Duration of animation can be gotten from the RAMPaperSwitch’s property duration
. You can animate CoreAnimation properties like this:
92 | self . paperSwitch . animationDidStartClosure = {( onAnimation : Bool ) in
93 | UIView . transitionWithView ( self . label , duration : self . paperSwitch . duration , options : UIViewAnimationOptions . TransitionCrossDissolve , animations : {
94 | self . label . textColor = onAnimation ? UIColor . whiteColor () : UIColor . blueColor ()
95 | }, completion : nil )
96 | }
97 |
98 | About
99 |
100 | The project maintained by app development agency Ramotion Inc.
101 | See our other open-source projects or hire us to design, develop, and grow your product.
102 |
103 |
104 |
105 |
106 |
107 |
108 |
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/docs/js/jazzy.js:
--------------------------------------------------------------------------------
1 | window.jazzy = {'docset': false}
2 | if (typeof window.dash != 'undefined') {
3 | document.documentElement.className += ' dash'
4 | window.jazzy.docset = true
5 | }
6 | if (navigator.userAgent.match(/xcode/i)) {
7 | document.documentElement.className += ' xcode'
8 | window.jazzy.docset = true
9 | }
10 |
11 | // On doc load, toggle the URL hash discussion if present
12 | $(document).ready(function() {
13 | if (!window.jazzy.docset) {
14 | var linkToHash = $('a[href="' + window.location.hash +'"]');
15 | linkToHash.trigger("click");
16 | }
17 | });
18 |
19 | // On token click, toggle its discussion and animate token.marginLeft
20 | $(".token").click(function(event) {
21 | if (window.jazzy.docset) {
22 | return;
23 | }
24 | var link = $(this);
25 | var animationDuration = 300;
26 | var tokenOffset = "15px";
27 | var original = link.css('marginLeft') == tokenOffset;
28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
29 | $content = link.parent().parent().next();
30 | $content.slideToggle(animationDuration);
31 |
32 | // Keeps the document from jumping to the hash.
33 | var href = $(this).attr('href');
34 | if (history.pushState) {
35 | history.pushState({}, '', href);
36 | } else {
37 | location.hash = href;
38 | }
39 | event.preventDefault();
40 | });
41 |
--------------------------------------------------------------------------------
/docs/undocumented.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/docs/undocumented.txt
--------------------------------------------------------------------------------
/header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/header.png
--------------------------------------------------------------------------------
/paper-switch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/paper-switch.gif
--------------------------------------------------------------------------------
/screenshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ramotion/paper-switch/0ee6532f9dc7fba7c467cdaac4e50dd9ff21a533/screenshot.gif
--------------------------------------------------------------------------------