├── Resources
└── colormap.png
├── Screenshots
├── color-picker-ipad.png
├── color-picker-iphone-4.png
├── color-picker-iphone-5.png
└── color-picker-ipad-landscape.png
├── .gitignore
├── Example
├── ColorPicker.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── fcanas.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── ColorPicker.xccheckout
│ └── project.pbxproj
├── Podfile
├── ColorPicker.xcworkspace
│ └── contents.xcworkspacedata
├── ColorPicker
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.m
│ ├── AppDelegate.m
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.xib
├── Podfile.lock
├── SwiftyPicker
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.swift
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
├── ColorPickerTests
│ ├── Info.plist
│ └── ColorPickerTests.m
├── SwiftyPickerTests
│ ├── Info.plist
│ └── SwiftyPickerTests.swift
└── SwiftyPickerUITests
│ ├── Info.plist
│ └── SwiftyPickerUITests.swift
├── Private
├── FCBrightDarkGradView.h
├── FCColorSwatchView.h
├── FCColorSwatchView.m
└── FCBrightDarkGradView.m
├── LICENSE
├── iOS-Color-Picker.podspec
├── README.md
├── FCColorPickerViewController.h
├── FCColorPickerViewController.m
└── FCColorPickerViewController.xib
/Resources/colormap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Resources/colormap.png
--------------------------------------------------------------------------------
/Screenshots/color-picker-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Screenshots/color-picker-ipad.png
--------------------------------------------------------------------------------
/Screenshots/color-picker-iphone-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Screenshots/color-picker-iphone-4.png
--------------------------------------------------------------------------------
/Screenshots/color-picker-iphone-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Screenshots/color-picker-iphone-5.png
--------------------------------------------------------------------------------
/Screenshots/color-picker-ipad-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Screenshots/color-picker-ipad-landscape.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .idea
3 | Example/Pods
4 | Example/ColorPicker.xcodeproj/xcuserdata
5 | Example/ColorPicker.xcworkspace/xcuserdata
6 | Example/ColorPicker.xcworkspace/xcshareddata
7 |
--------------------------------------------------------------------------------
/Example/ColorPicker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/ColorPicker.xcodeproj/project.xcworkspace/xcuserdata/fcanas.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fcanas/ios-color-picker/HEAD/Example/ColorPicker.xcodeproj/project.xcworkspace/xcuserdata/fcanas.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '9.0'
2 | source 'https://github.com/CocoaPods/Specs.git'
3 |
4 | target :ColorPicker do
5 | pod 'iOS-Color-Picker', path: '../'
6 | end
7 |
8 | target :SwiftyPicker do
9 | use_frameworks!
10 | pod 'iOS-Color-Picker', path: '../'
11 | end
12 |
--------------------------------------------------------------------------------
/Example/ColorPicker.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/ColorPicker/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ColorPicker
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Private/FCBrightDarkGradView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FCBrightDarkGradView.h
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas
6 | // Copyright 2010-2014. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FCBrightDarkGradView : UIView
12 |
13 | @property (readwrite,nonatomic,copy) UIColor *color;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Private/FCColorSwatchView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ColorSwatchView.h
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas on 9/9/10.
6 | // Copyright 2010-2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FCColorSwatchView : UIView
12 |
13 | @property (readwrite, copy, nonatomic) UIColor *color;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - iOS-Color-Picker (1.2)
3 |
4 | DEPENDENCIES:
5 | - iOS-Color-Picker (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | iOS-Color-Picker:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | iOS-Color-Picker: 99b05749296dc04495236158ec05c206d1604d65
13 |
14 | PODFILE CHECKSUM: 0a56a9673ab74b8eb643273c6035a300321b3688
15 |
16 | COCOAPODS: 1.5.3
17 |
--------------------------------------------------------------------------------
/Example/ColorPicker/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ColorPicker
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Example/ColorPicker/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ColorPicker
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftyPicker
4 | //
5 | // Created by Fabian Canas on 9/14/15.
6 | // Copyright © 2015 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
17 | return true
18 | }
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Example/ColorPicker/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Example/ColorPickerTests/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 |
--------------------------------------------------------------------------------
/Example/SwiftyPickerTests/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 |
--------------------------------------------------------------------------------
/Example/SwiftyPickerUITests/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 |
--------------------------------------------------------------------------------
/Private/FCColorSwatchView.m:
--------------------------------------------------------------------------------
1 | //
2 | // ColorSwatchView.m
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas on 9/9/10.
6 | // Copyright 2010-2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import "FCColorSwatchView.h"
10 | #import
11 |
12 | @implementation FCColorSwatchView
13 |
14 | -(id)initWithCoder:(NSCoder *)aDecoder {
15 | self = [super initWithCoder:aDecoder];
16 | if (self) {
17 | [self setupLayers];
18 | }
19 | return self;
20 | }
21 |
22 | -(void)setupLayers {
23 | CALayer *layer = self.layer;
24 | UIColor *edgeColor = [UIColor colorWithWhite:0.9 alpha:0.8];
25 | [layer setBackgroundColor:self.color.CGColor];
26 | [layer setCornerRadius:7];
27 | [layer setBorderWidth:2.0f];
28 | [layer setBorderColor:edgeColor.CGColor];
29 | }
30 |
31 | -(void)setColor:(UIColor *)swatchColor {
32 | if (_color != swatchColor) {
33 | _color = [swatchColor copy];
34 | [self.layer setBackgroundColor:_color.CGColor];
35 | }
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Example/ColorPickerTests/ColorPickerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ColorPickerTests.m
3 | // ColorPickerTests
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ColorPickerTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation ColorPickerTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Fabian Canas
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 |
--------------------------------------------------------------------------------
/Example/SwiftyPickerTests/SwiftyPickerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyPickerTests.swift
3 | // SwiftyPickerTests
4 | //
5 | // Created by Fabian Canas on 9/14/15.
6 | // Copyright © 2015 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import SwiftyPicker
11 |
12 | class SwiftyPickerTests: 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 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Example/SwiftyPickerUITests/SwiftyPickerUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyPickerUITests.swift
3 | // SwiftyPickerUITests
4 | //
5 | // Created by Fabian Canas on 9/14/15.
6 | // Copyright © 2015 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class SwiftyPickerUITests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 |
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 |
18 | // In UI tests it is usually best to stop immediately when a failure occurs.
19 | continueAfterFailure = false
20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
21 | XCUIApplication().launch()
22 |
23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
24 | }
25 |
26 | override func tearDown() {
27 | // Put teardown code here. This method is called after the invocation of each test method in the class.
28 | super.tearDown()
29 | }
30 |
31 | func testExample() {
32 | // Use recording to get started writing UI tests.
33 | // Use XCTAssert and related functions to verify your tests produce the correct results.
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Example/ColorPicker/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 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 | UIInterfaceOrientationPortraitUpsideDown
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SwiftyPicker
4 | //
5 | // Created by Fabian Canas on 9/14/15.
6 | // Copyright © 2015 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import iOS_Color_Picker
11 |
12 | class ViewController: UIViewController, FCColorPickerViewControllerDelegate {
13 |
14 | var color = UIColor.blue {
15 | didSet {
16 | self.view?.backgroundColor = color
17 | }
18 | }
19 |
20 | override func viewDidLoad() {
21 | super.viewDidLoad()
22 | // Do any additional setup after loading the view, typically from a nib.
23 | }
24 |
25 | override func didReceiveMemoryWarning() {
26 | super.didReceiveMemoryWarning()
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 | @IBAction func pickColor(_ sender :AnyObject) {
31 | let colorPicker = FCColorPickerViewController()
32 | colorPicker.color = color
33 | colorPicker.delegate = self
34 | present(colorPicker, animated: true, completion: nil)
35 | }
36 |
37 | func colorPickerViewController(_ colorPicker: FCColorPickerViewController, didSelect color: UIColor) {
38 | self.color = color
39 | dismiss(animated: true, completion: nil)
40 | }
41 |
42 | func colorPickerViewControllerDidCancel(_ colorPicker: FCColorPickerViewController) {
43 | dismiss(animated: true, completion: nil)
44 | }
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/Example/ColorPicker/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // ColorPicker
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import
12 |
13 | @interface ViewController ()
14 | @property (nonatomic, copy) UIColor *color;
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (IBAction)pickColor:(id)sender {
20 | FCColorPickerViewController *colorPicker = [FCColorPickerViewController colorPickerWithColor:self.color
21 | delegate:self];
22 | colorPicker.tintColor = [UIColor whiteColor];
23 | [colorPicker setModalPresentationStyle:UIModalPresentationFormSheet];
24 | [self presentViewController:colorPicker
25 | animated:YES
26 | completion:nil];
27 | }
28 |
29 | - (void)colorPickerViewController:(FCColorPickerViewController *)colorPicker
30 | didSelectColor:(UIColor *)color
31 | {
32 | self.color = color;
33 | [self dismissViewControllerAnimated:YES completion:nil];
34 | }
35 |
36 | - (void)colorPickerViewControllerDidCancel:(FCColorPickerViewController *)colorPicker
37 | {
38 | [self dismissViewControllerAnimated:YES completion:nil];
39 | }
40 |
41 | - (void)setColor:(UIColor *)color
42 | {
43 | _color = [color copy];
44 | [self.view setBackgroundColor:_color];
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/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 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Example/ColorPicker.xcodeproj/project.xcworkspace/xcshareddata/ColorPicker.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 996AA7C6-D374-4498-91B1-913A48EF6FD8
9 | IDESourceControlProjectName
10 | ColorPicker
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | B9FDE557AA3B27B4B610AE59C13C344DF7573767
14 | https://github.com/fcanas/ios-color-picker.git
15 |
16 | IDESourceControlProjectPath
17 | ColorPicker/ColorPicker.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | B9FDE557AA3B27B4B610AE59C13C344DF7573767
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/fcanas/ios-color-picker.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | B9FDE557AA3B27B4B610AE59C13C344DF7573767
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | B9FDE557AA3B27B4B610AE59C13C344DF7573767
36 | IDESourceControlWCCName
37 | ios-color-picker
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/Private/FCBrightDarkGradView.m:
--------------------------------------------------------------------------------
1 | //
2 | // FCBrightDarkGradView.h
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas
6 | // Copyright 2010-2014. All rights reserved.
7 | //
8 |
9 | #import "FCBrightDarkGradView.h"
10 |
11 | @interface FCBrightDarkGradView () {
12 | CGGradientRef gradient;
13 | }
14 |
15 | @end
16 |
17 | @implementation FCBrightDarkGradView
18 |
19 | -(void)setColor:(UIColor *)color {
20 | if (_color != color) {
21 | _color = [color copy];
22 | [self setupGradient];
23 | [self setNeedsDisplay];
24 | }
25 | }
26 |
27 | - (void)setupGradient {
28 | // Create a color equivalent to the current color with brightness maximized
29 | const CGFloat *c = CGColorGetComponents([_color CGColor]);
30 | CGFloat colors[] =
31 | {
32 | c[0],c[1],c[2],1.0,
33 | 0.0/255.0,0.0/255.0,0.0/255.0,1.0, // black
34 | };
35 |
36 | CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
37 |
38 | if (gradient!=nil) {
39 | CGGradientRelease(gradient);
40 | }
41 | gradient = CGGradientCreateWithColorComponents(rgb, colors, NULL, sizeof(colors)/(sizeof(colors[0])*4));
42 | CGColorSpaceRelease(rgb);
43 | }
44 |
45 | - (void)drawRect:(CGRect)rect {
46 | CGContextRef context = UIGraphicsGetCurrentContext();
47 |
48 | // The clipping rects we plan to use, which also defines the locations of each gradient
49 | CGRect clippingRect = CGRectMake(0.0, 0.0, self.frame.size.width, self.frame.size.height);
50 |
51 | CGPoint endPoints[] =
52 | {
53 | CGPointMake(0,0),
54 | CGPointMake(self.frame.size.width,0),
55 | };
56 |
57 | // Clip to area to draw the gradient, and draw it. Since we are clipping, we save the graphics state
58 | // so that we can revert to the previous larger area.
59 | CGContextSaveGState(context);
60 | CGContextClipToRect(context, clippingRect);
61 |
62 | CGContextDrawLinearGradient(context, gradient, endPoints[0], endPoints[1], 0);
63 | CGContextRestoreGState(context);
64 | }
65 |
66 | - (void)dealloc {
67 | CGGradientRelease(gradient);
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/iOS-Color-Picker.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "iOS-Color-Picker"
3 | s.version = "1.2"
4 | s.summary = "An HSL color-picker for the iPhone."
5 | s.description = <<-DESC
6 | A reusable, simple color picker for iOS.
7 |
8 | * Works on iPhone
9 | * Works on iPad
10 | DESC
11 | s.homepage = "https://github.com/fcanas/ios-color-picker"
12 | s.license = {
13 | :type => 'MIT',
14 | :text => <<-LICENSE
15 | Copyright (C) 2018 Fabian Canas
16 |
17 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18 |
19 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
22 | LICENSE
23 | }
24 | s.author = { "Fabian Canas" => "fcanas@gmail.com" }
25 | s.source = { :git => "https://github.com/fcanas/ios-color-picker.git", :tag => "v1.2" }
26 | s.platform = :ios, '9.0'
27 | s.exclude_files = 'Example'
28 | s.source_files = '**/*.{h,m}'
29 | s.public_header_files = 'FCColorPickerViewController.h'
30 | s.requires_arc = true
31 | s.resources = "Resources/*.png", 'FCColorPickerViewController.xib'
32 | s.frameworks = 'QuartzCore', 'Foundation', 'UIKit', 'CoreGraphics'
33 | end
34 |
--------------------------------------------------------------------------------
/Example/ColorPicker/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ColorPicker
4 | //
5 | // Created by Fabian Canas on 12/6/14.
6 | // Copyright (c) 2014 Fabián Cañas. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/SwiftyPicker/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Example/ColorPicker/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # iOS Color Picker
2 |
3 | [](http://cocoadocs.org/docsets/iOS-Color-Picker)
4 | [](http://cocoadocs.org/docsets/iOS-Color-Picker)
5 | [](http://cocoadocs.org/docsets/iOS-Color-Picker)
6 |
7 | A reusable color picker component for iOS. Works for iPhone, iPad, in modal sheets, popovers... just about anywhere.
8 |
9 | # Using iOS-Color-Picker
10 |
11 | ## Installation
12 |
13 | The easiest way to use iOS-Color-Picker is with [CocoaPods](http://cocoapods.org). Add the following line to your `Podfile`.
14 |
15 | ```ruby
16 | pod 'iOS-Color-Picker'
17 | ```
18 |
19 | Otherwise, you need to include the following files in your project:
20 |
21 | * `FCColorPickerViewController.h`
22 | * `FCColorPickerViewController.m`
23 | * `FCColorPickerViewController.xib`
24 | * `Resources/colormap.png`
25 |
26 | ## Using a Color Picker from a View Controller
27 |
28 | Suppose you have a view controller with a `color` property you'd like to let the user pick.
29 | Make your view controller implement the `FCColorPickerViewControllerDelegate` protocol. Handle the color picked and the cancelled methods, and make a method that triggers showing the view controller.
30 |
31 | ```objc
32 | -(IBAction)chooseColor:(id)sender {
33 | FCColorPickerViewController *colorPicker = [FCColorPickerViewController colorPicker];
34 | colorPicker.color = self.color;
35 | colorPicker.delegate = self;
36 |
37 | [colorPicker setModalPresentationStyle:UIModalPresentationFormSheet];
38 | [self presentViewController:colorPicker animated:YES completion:nil];
39 | }
40 |
41 | #pragma mark - FCColorPickerViewControllerDelegate Methods
42 |
43 | -(void)colorPickerViewController:(FCColorPickerViewController *)colorPicker didSelectColor:(UIColor *)color {
44 | self.color = color;
45 | [self dismissViewControllerAnimated:YES completion:nil];
46 | }
47 |
48 | -(void)colorPickerViewControllerDidCancel:(FCColorPickerViewController *)colorPicker {
49 | [self dismissViewControllerAnimated:YES completion:nil];
50 | }
51 | ```
52 |
53 | The color picker has `tintColor` and `backgroundColor` properties for configuring its appearance.
54 |
55 | # Screenshots
56 |
57 | ### iPhone
58 |
59 |
60 |
61 |
62 |
63 |
64 | ### iPad
65 |
66 |
67 |
68 |
69 |
70 |
71 | # Example Project
72 |
73 | An example project is included in `/Example`. Run `pod install` in the example directory to configure the project, then open the Xcode workspace.
74 |
75 |
--------------------------------------------------------------------------------
/Example/ColorPicker/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/FCColorPickerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ColorPickerViewController.h
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas
6 | // Based on work by Gilly Dekel on 23/3/09
7 | // Copyright 2010-2014. All rights reserved.
8 | //
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | `FCColorPickerViewController` is a view controller that displays a color picker to the user.
16 |
17 | To use it, instantiate a `FCColorPickerViewController` with one of the class constructors, set a delegate that
18 | implements the `FCColorPickerViewControllerDelegate` protocol, and present the color picker however you wish,
19 | *e.g.* modally full screen, modally in a form, in a popover, etc. You are responsible for dismissing the color
20 | picker when the user finishes picking a color. The delegate methods in the `FCColorPickerViewControllerDelegate`
21 | protocol and the `color` property of the color picker provide a reference to the color the user picked.
22 | */
23 | @class FCColorPickerViewController, FCBrightDarkGradView, FCColorSwatchView;
24 |
25 | /**
26 | The delegate of an `FCColorPickerViewController` must adopt the `FCColorPickerViewControllerDelegate` protocol.
27 |
28 | The primary responsibility of the delegate is hiding or dismissing the picker controller when the picker has finished.
29 | The delegate is the object that is told which color the picker picked.
30 | */
31 | @protocol FCColorPickerViewControllerDelegate
32 |
33 | /**
34 | Called on the delegate of `colorPicker` when the user has finished selecting a color.
35 |
36 | @param colorPicker The `FCColorPickerViewController` that has finished picking a color.
37 | @param color The color that was picked by the user.
38 | */
39 | - (void)colorPickerViewController:(FCColorPickerViewController *)colorPicker didSelectColor:(UIColor *)color;
40 |
41 | /**
42 | Called on the delegate of `colorPicker` when the user has canceled selecting a color.
43 |
44 | @param colorPicker The `FCColorPickerViewController` that has canceled picking a color.
45 | */
46 | - (void)colorPickerViewControllerDidCancel:(FCColorPickerViewController *)colorPicker;
47 |
48 | @end
49 |
50 | @interface FCColorPickerViewController : UIViewController
51 |
52 | /// @name Initializing a Color Picker object
53 |
54 | /**
55 | Creates and returns a color picker.
56 | */
57 | + (nonnull instancetype)colorPicker;
58 |
59 | /**
60 | Creates and returns a color picker initialized with the provided color and delegate.
61 | @paran color The initial value for the color picker's `color` property. The color picker will represent this color when presented.
62 | @param delegate An object implementing the `FCColorPickerViewControllerDelegate` protocol to act as the picker's delegate
63 | @see -color,
64 | @see -delegate
65 | */
66 | + (instancetype)colorPickerWithColor:(nullable UIColor *)color delegate:(nullable id) delegate;
67 |
68 | /// @name The Color
69 |
70 | /**
71 | The color that the picker is representing.
72 |
73 | Its value changes as the user interacts with the picker, and changing the property will update the UI accordingly.
74 | */
75 | @property (readwrite, nonatomic, copy, nullable) UIColor *color;
76 |
77 | /// @name Managing the Delegate
78 |
79 | /**
80 | The object that acts as the delegate of the receiving color picker.
81 |
82 | The delegate must adopt the `FCColorPickerViewControllerDelegate` protocol. The delegate is not retained.
83 |
84 | @see FCColorPickerViewControllerDelegate protocol
85 | */
86 | @property (nonatomic, weak, nullable) id delegate;
87 |
88 | /// @name Controlling the Color Picker's Appearance
89 |
90 | /**
91 | The view controller's background color.
92 |
93 | The default value is nil, which results in a dark gray color on iPhones, and a clear color on iPads.
94 | @see -tintColor
95 | */
96 | @property (nonatomic, copy, nullable) UIColor *backgroundColor;
97 |
98 | /**
99 | The view controller's tint color.
100 |
101 | Updates to the `tintColor` property are forwarded to the color picker's view. The tint color affects the coloring of the "Choose" and "Cancel" buttons in iOS 7. Below iOS 7, this property has no effect.
102 | `tintColor` is initially derived from the view hierarchy in the normal way for views iOS 7+. Setting this property to `nil` restores this behavior.
103 | @see -backgroundColor
104 | */
105 | @property (nonatomic, copy, null_resettable) UIColor *tintColor;
106 |
107 | @end
108 |
109 | NS_ASSUME_NONNULL_END
110 |
--------------------------------------------------------------------------------
/FCColorPickerViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ColorPickerViewController.m
3 | // ColorPicker
4 | //
5 | // Created by Fabián Cañas
6 | // Based on work by Gilly Dekel on 23/3/09
7 | // Copyright 2010-2018. All rights reserved.
8 | //
9 |
10 | #import "FCColorPickerViewController.h"
11 | #import "FCBrightDarkGradView.h"
12 | #import "FCColorSwatchView.h"
13 |
14 | @interface FCColorPickerViewController () {
15 | CGFloat currentBrightness;
16 | CGFloat currentHue;
17 | CGFloat currentSaturation;
18 | BOOL viewIsLoaded;
19 | UIColor *_tintColor;
20 | }
21 |
22 | @property (readwrite, nonatomic, strong) IBOutlet FCBrightDarkGradView *gradientView;
23 | @property (readwrite, nonatomic, strong) IBOutlet UIImageView *hueSatImage;
24 | @property (readwrite, nonatomic, strong) IBOutlet UIView *crossHairs;
25 | @property (readwrite, nonatomic, strong) IBOutlet UIView *brightnessBar;
26 | @property (readwrite, nonatomic, strong) IBOutlet FCColorSwatchView *swatch;
27 |
28 | - (IBAction) chooseSelectedColor;
29 | - (IBAction) cancelColorSelection;
30 |
31 | @end
32 |
33 | @implementation FCColorPickerViewController
34 |
35 | + (instancetype)colorPicker
36 | {
37 | return [[self alloc] initWithNibName:@"FCColorPickerViewController" bundle:[NSBundle bundleForClass:[self class]]];
38 | }
39 |
40 | + (instancetype)colorPickerWithColor:(UIColor *)color delegate:(id)delegate
41 | {
42 | FCColorPickerViewController *picker = [self colorPicker];
43 | picker.color = color;
44 | picker.delegate = delegate;
45 | return picker;
46 | }
47 |
48 | - (instancetype)init
49 | {
50 | return [self initWithNibName:@"FCColorPickerViewController" bundle:[NSBundle bundleForClass:[self class]]];
51 | }
52 |
53 | - (void)viewDidLoad
54 | {
55 | [super viewDidLoad];
56 | [self.view bringSubviewToFront:_crossHairs];
57 | [self.view bringSubviewToFront:_brightnessBar];
58 | viewIsLoaded = YES;
59 |
60 | UIColor *edgeColor = [UIColor colorWithWhite:0.9 alpha:0.8];
61 |
62 | self.crossHairs.layer.cornerRadius = 19;
63 | self.crossHairs.layer.borderColor = edgeColor.CGColor;
64 | self.crossHairs.layer.borderWidth = 2;
65 | self.crossHairs.layer.shadowColor = [UIColor blackColor].CGColor;
66 | self.crossHairs.layer.shadowOffset = CGSizeZero;
67 | self.crossHairs.layer.shadowRadius = 1;
68 | self.crossHairs.layer.shadowOpacity = 0.5;
69 |
70 | self.brightnessBar.layer.cornerRadius = 9;
71 | self.brightnessBar.layer.borderColor = edgeColor.CGColor;
72 | self.brightnessBar.layer.borderWidth = 2;
73 | }
74 |
75 | - (void)viewWillAppear:(BOOL)animated
76 | {
77 | [super viewWillAppear:animated];
78 | [self setColor:_color];
79 | [self updateBrightnessPosition];
80 | [self updateGradientColor];
81 | [self updateCrosshairPosition];
82 | _swatch.color = _color;
83 | self.tintColor = self.tintColor;
84 | self.backgroundColor = self.backgroundColor;
85 | }
86 |
87 | - (void)viewWillLayoutSubviews {
88 | [super viewWillLayoutSubviews];
89 | [self updateBrightnessPosition];
90 | [self updateCrosshairPosition];
91 | }
92 |
93 | #pragma mark - Appearance
94 |
95 | - (void)setTintColor:(UIColor *)tintColor
96 | {
97 | _tintColor = [tintColor copy];
98 | if (!viewIsLoaded) {
99 | return;
100 | }
101 | if ([self.view respondsToSelector:@selector(setTintColor:)]) {
102 | [self.view setTintColor:self.tintColor];
103 | }
104 | }
105 |
106 | - (UIColor *)tintColor
107 | {
108 | if (_tintColor) {
109 | return _tintColor;
110 | }
111 | return self.view.tintColor;
112 | }
113 |
114 | - (void)setBackgroundColor:(UIColor *)backgroundColor
115 | {
116 | _backgroundColor = [backgroundColor copy];
117 | if (viewIsLoaded) {
118 | if (_backgroundColor != nil) {
119 | self.view.backgroundColor = _backgroundColor;
120 | } else {
121 | self.view.backgroundColor = [[UIDevice currentDevice] userInterfaceIdiom]==UIUserInterfaceIdiomPhone?[UIColor darkGrayColor]:[UIColor clearColor];
122 | }
123 | }
124 | }
125 |
126 | #pragma mark - Color Manipulation
127 |
128 | - (void)_setColor:(UIColor *)newColor
129 | {
130 | if (![_color isEqual:newColor]) {
131 |
132 | CGFloat brightness;
133 | [newColor getHue:NULL saturation:NULL brightness:&brightness alpha:NULL];
134 | CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(CGColorGetColorSpace(newColor.CGColor));
135 | if (colorSpaceModel==kCGColorSpaceModelMonochrome) {
136 | const CGFloat *c = CGColorGetComponents(newColor.CGColor);
137 | _color = [UIColor colorWithHue:0
138 | saturation:0
139 | brightness:c[0]
140 | alpha:1.0];
141 | } else {
142 | _color = [newColor copy];
143 | }
144 |
145 | _swatch.color = _color;
146 | }
147 | }
148 |
149 | - (void)setColor:(UIColor *)newColor
150 | {
151 | CGFloat hue, saturation;
152 | [newColor getHue:&hue saturation:&saturation brightness:NULL alpha:NULL];
153 |
154 | currentHue = hue;
155 | currentSaturation = saturation;
156 | [self _setColor:newColor];
157 | [self updateGradientColor];
158 | [self updateBrightnessPosition];
159 | [self updateCrosshairPosition];
160 | }
161 |
162 | - (void)updateBrightnessPosition
163 | {
164 | [_color getHue:NULL saturation:NULL brightness:¤tBrightness alpha:NULL];
165 |
166 | CGPoint center = [[_brightnessBar superview] convertPoint:_gradientView.center fromView:[_gradientView superview]];
167 | CGPoint origin = [[_brightnessBar superview] convertPoint:_gradientView.frame.origin fromView:[_gradientView superview]];
168 |
169 | CGPoint brightnessPosition;
170 | brightnessPosition.x = (1.0-currentBrightness)*_gradientView.frame.size.width + origin.x;
171 |
172 | brightnessPosition.y = center.y;
173 | _brightnessBar.center = brightnessPosition;
174 | }
175 |
176 | - (void)updateCrosshairPosition
177 | {
178 | CGPoint hueSatPosition;
179 |
180 | CGRect hueSatFrame = [self.view convertRect:_hueSatImage.frame fromView:[_hueSatImage superview]];
181 |
182 | hueSatPosition.x = (currentHue*_hueSatImage.frame.size.width) + hueSatFrame.origin.x;
183 | hueSatPosition.y = (1.0-currentSaturation)*_hueSatImage.frame.size.height + hueSatFrame.origin.y;
184 |
185 | _crossHairs.center = hueSatPosition;
186 | [self updateGradientColor];
187 | }
188 |
189 | - (void)updateGradientColor
190 | {
191 | UIColor *gradientColor = [UIColor colorWithHue: currentHue
192 | saturation: currentSaturation
193 | brightness: 1.0
194 | alpha:1.0];
195 |
196 | _brightnessBar.layer.backgroundColor = _color.CGColor;
197 | _crossHairs.layer.backgroundColor = gradientColor.CGColor;
198 |
199 | [_gradientView setColor:gradientColor];
200 | }
201 |
202 | - (void)updateHueSatWithTouch:(UITouch *)touch
203 | {
204 | CGPoint positionInHueSat = [touch locationInView:_hueSatImage];
205 | currentHue = positionInHueSat.x/_hueSatImage.frame.size.width;
206 | currentSaturation = 1.0 - positionInHueSat.y/_hueSatImage.frame.size.height;
207 |
208 | UIColor *_tcolor = [UIColor colorWithHue:currentHue
209 | saturation:currentSaturation
210 | brightness:currentBrightness
211 | alpha:1.0];
212 | UIColor *gradientColor = [UIColor colorWithHue: currentHue
213 | saturation: currentSaturation
214 | brightness: 1.0
215 | alpha:1.0];
216 |
217 |
218 | _crossHairs.layer.backgroundColor = gradientColor.CGColor;
219 | [self updateGradientColor];
220 |
221 | [self _setColor:_tcolor];
222 |
223 | _swatch.color = _color;
224 | _brightnessBar.layer.backgroundColor = _color.CGColor;
225 | [self updateCrosshairPosition];
226 | }
227 |
228 | - (void)updateBrightnessWithTouch:(UITouch *)touch
229 | {
230 | CGPoint positionInGradientView = [touch locationInView:_gradientView];
231 | currentBrightness = 1.0 - (positionInGradientView.x/_gradientView.frame.size.width) ;
232 |
233 | UIColor *_tcolor = [UIColor colorWithHue:currentHue
234 | saturation:currentSaturation
235 | brightness:currentBrightness
236 | alpha:1.0];
237 | [self _setColor:_tcolor];
238 |
239 | _brightnessBar.layer.backgroundColor = _color.CGColor;
240 | _swatch.color = _color;
241 | [self updateBrightnessPosition];
242 | }
243 |
244 | #pragma mark - Touch Handling
245 |
246 | // Handles the start of a touch
247 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
248 | {
249 | for (UITouch *touch in touches) {
250 | [self dispatchTouchEvent:touch];
251 | }
252 | }
253 |
254 | // Handles the continuation of a touch.
255 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
256 | {
257 | for (UITouch *touch in touches){
258 | [self dispatchTouchEvent:touch];
259 | }
260 | }
261 |
262 | - (void)dispatchTouchEvent:(UITouch *)touch
263 | {
264 | if (CGRectContainsPoint(_hueSatImage.bounds,[touch locationInView:_hueSatImage])) {
265 | [self updateHueSatWithTouch:touch];
266 | } else if (CGRectContainsPoint(_gradientView.bounds, [touch locationInView:_gradientView])) {
267 | [self updateBrightnessWithTouch:touch];
268 | }
269 | }
270 |
271 | #pragma mark - IBActions
272 |
273 | - (IBAction)chooseSelectedColor
274 | {
275 | [_delegate colorPickerViewController:self didSelectColor:self.color];
276 | }
277 |
278 | - (IBAction)cancelColorSelection
279 | {
280 | [_delegate colorPickerViewControllerDidCancel:self];
281 | }
282 |
283 | @end
284 |
--------------------------------------------------------------------------------
/FCColorPickerViewController.xib:
--------------------------------------------------------------------------------
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 |
52 |
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 |
--------------------------------------------------------------------------------
/Example/ColorPicker.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 23ADB8CB97602E0DA5BEA3AB /* Pods_SwiftyPicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB99C0A8744ADBEBA001CC82 /* Pods_SwiftyPicker.framework */; };
11 | 45E19570ADF24F1EC3BC09F6 /* libPods-ColorPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F0B359BB80CA78216E3ABEBF /* libPods-ColorPicker.a */; };
12 | E703BACF1C056E910098A5D9 /* iOS_Color_Picker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E703BACE1C056E910098A5D9 /* iOS_Color_Picker.framework */; };
13 | E774D5DF1BA7CF08009DEA14 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E774D5DE1BA7CF08009DEA14 /* AppDelegate.swift */; };
14 | E774D5E11BA7CF08009DEA14 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E774D5E01BA7CF08009DEA14 /* ViewController.swift */; };
15 | E774D5E41BA7CF08009DEA14 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E774D5E21BA7CF08009DEA14 /* Main.storyboard */; };
16 | E774D5E61BA7CF08009DEA14 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E774D5E51BA7CF08009DEA14 /* Assets.xcassets */; };
17 | E774D5E91BA7CF08009DEA14 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E774D5E71BA7CF08009DEA14 /* LaunchScreen.storyboard */; };
18 | E774D5F41BA7CF08009DEA14 /* SwiftyPickerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E774D5F31BA7CF08009DEA14 /* SwiftyPickerTests.swift */; };
19 | E774D5FF1BA7CF08009DEA14 /* SwiftyPickerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E774D5FE1BA7CF08009DEA14 /* SwiftyPickerUITests.swift */; };
20 | E7D4BB211A33995200C98327 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E7D4BB201A33995200C98327 /* main.m */; };
21 | E7D4BB241A33995200C98327 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E7D4BB231A33995200C98327 /* AppDelegate.m */; };
22 | E7D4BB271A33995200C98327 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E7D4BB261A33995200C98327 /* ViewController.m */; };
23 | E7D4BB2A1A33995200C98327 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E7D4BB281A33995200C98327 /* Main.storyboard */; };
24 | E7D4BB2C1A33995200C98327 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7D4BB2B1A33995200C98327 /* Images.xcassets */; };
25 | E7D4BB2F1A33995200C98327 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E7D4BB2D1A33995200C98327 /* LaunchScreen.xib */; };
26 | E7D4BB3B1A33995200C98327 /* ColorPickerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7D4BB3A1A33995200C98327 /* ColorPickerTests.m */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | E774D5F01BA7CF08009DEA14 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = E7D4BB131A33995200C98327 /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = E774D5DB1BA7CF08009DEA14;
35 | remoteInfo = SwiftyPicker;
36 | };
37 | E774D5FB1BA7CF08009DEA14 /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = E7D4BB131A33995200C98327 /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = E774D5DB1BA7CF08009DEA14;
42 | remoteInfo = SwiftyPicker;
43 | };
44 | E7D4BB351A33995200C98327 /* PBXContainerItemProxy */ = {
45 | isa = PBXContainerItemProxy;
46 | containerPortal = E7D4BB131A33995200C98327 /* Project object */;
47 | proxyType = 1;
48 | remoteGlobalIDString = E7D4BB1A1A33995200C98327;
49 | remoteInfo = ColorPicker;
50 | };
51 | /* End PBXContainerItemProxy section */
52 |
53 | /* Begin PBXFileReference section */
54 | 2371BD0567C177ECF3B531E0 /* Pods-ColorPicker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ColorPicker.release.xcconfig"; path = "Pods/Target Support Files/Pods-ColorPicker/Pods-ColorPicker.release.xcconfig"; sourceTree = ""; };
55 | 40496FC580E12B316DDF225B /* Pods-SwiftyPicker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyPicker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftyPicker/Pods-SwiftyPicker.debug.xcconfig"; sourceTree = ""; };
56 | 9A4BC56973A2BB7973D26391 /* Pods-SwiftyPicker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyPicker.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftyPicker/Pods-SwiftyPicker.release.xcconfig"; sourceTree = ""; };
57 | CA49524B6F78A368452D6FB5 /* Pods-ColorPicker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ColorPicker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ColorPicker/Pods-ColorPicker.debug.xcconfig"; sourceTree = ""; };
58 | E703BACE1C056E910098A5D9 /* iOS_Color_Picker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iOS_Color_Picker.framework; path = "Pods/../build/Debug-iphoneos/iOS_Color_Picker.framework"; sourceTree = ""; };
59 | E774D5DC1BA7CF08009DEA14 /* SwiftyPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyPicker.app; sourceTree = BUILT_PRODUCTS_DIR; };
60 | E774D5DE1BA7CF08009DEA14 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
61 | E774D5E01BA7CF08009DEA14 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
62 | E774D5E31BA7CF08009DEA14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
63 | E774D5E51BA7CF08009DEA14 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
64 | E774D5E81BA7CF08009DEA14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
65 | E774D5EA1BA7CF08009DEA14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | E774D5EF1BA7CF08009DEA14 /* SwiftyPickerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftyPickerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
67 | E774D5F31BA7CF08009DEA14 /* SwiftyPickerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyPickerTests.swift; sourceTree = ""; };
68 | E774D5F51BA7CF08009DEA14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
69 | E774D5FA1BA7CF08009DEA14 /* SwiftyPickerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftyPickerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
70 | E774D5FE1BA7CF08009DEA14 /* SwiftyPickerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyPickerUITests.swift; sourceTree = ""; };
71 | E774D6001BA7CF08009DEA14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
72 | E7D4BB1B1A33995200C98327 /* ColorPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ColorPicker.app; sourceTree = BUILT_PRODUCTS_DIR; };
73 | E7D4BB1F1A33995200C98327 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
74 | E7D4BB201A33995200C98327 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
75 | E7D4BB221A33995200C98327 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
76 | E7D4BB231A33995200C98327 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
77 | E7D4BB251A33995200C98327 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
78 | E7D4BB261A33995200C98327 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
79 | E7D4BB291A33995200C98327 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
80 | E7D4BB2B1A33995200C98327 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
81 | E7D4BB2E1A33995200C98327 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
82 | E7D4BB341A33995200C98327 /* ColorPickerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ColorPickerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
83 | E7D4BB391A33995200C98327 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
84 | E7D4BB3A1A33995200C98327 /* ColorPickerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ColorPickerTests.m; sourceTree = ""; };
85 | EB99C0A8744ADBEBA001CC82 /* Pods_SwiftyPicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftyPicker.framework; sourceTree = BUILT_PRODUCTS_DIR; };
86 | F0B359BB80CA78216E3ABEBF /* libPods-ColorPicker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ColorPicker.a"; sourceTree = BUILT_PRODUCTS_DIR; };
87 | /* End PBXFileReference section */
88 |
89 | /* Begin PBXFrameworksBuildPhase section */
90 | E774D5D91BA7CF08009DEA14 /* Frameworks */ = {
91 | isa = PBXFrameworksBuildPhase;
92 | buildActionMask = 2147483647;
93 | files = (
94 | E703BACF1C056E910098A5D9 /* iOS_Color_Picker.framework in Frameworks */,
95 | 23ADB8CB97602E0DA5BEA3AB /* Pods_SwiftyPicker.framework in Frameworks */,
96 | );
97 | runOnlyForDeploymentPostprocessing = 0;
98 | };
99 | E774D5EC1BA7CF08009DEA14 /* Frameworks */ = {
100 | isa = PBXFrameworksBuildPhase;
101 | buildActionMask = 2147483647;
102 | files = (
103 | );
104 | runOnlyForDeploymentPostprocessing = 0;
105 | };
106 | E774D5F71BA7CF08009DEA14 /* Frameworks */ = {
107 | isa = PBXFrameworksBuildPhase;
108 | buildActionMask = 2147483647;
109 | files = (
110 | );
111 | runOnlyForDeploymentPostprocessing = 0;
112 | };
113 | E7D4BB181A33995200C98327 /* Frameworks */ = {
114 | isa = PBXFrameworksBuildPhase;
115 | buildActionMask = 2147483647;
116 | files = (
117 | 45E19570ADF24F1EC3BC09F6 /* libPods-ColorPicker.a in Frameworks */,
118 | );
119 | runOnlyForDeploymentPostprocessing = 0;
120 | };
121 | E7D4BB311A33995200C98327 /* Frameworks */ = {
122 | isa = PBXFrameworksBuildPhase;
123 | buildActionMask = 2147483647;
124 | files = (
125 | );
126 | runOnlyForDeploymentPostprocessing = 0;
127 | };
128 | /* End PBXFrameworksBuildPhase section */
129 |
130 | /* Begin PBXGroup section */
131 | 26397613270C2C1DFD39E86C /* Pods */ = {
132 | isa = PBXGroup;
133 | children = (
134 | CA49524B6F78A368452D6FB5 /* Pods-ColorPicker.debug.xcconfig */,
135 | 2371BD0567C177ECF3B531E0 /* Pods-ColorPicker.release.xcconfig */,
136 | 40496FC580E12B316DDF225B /* Pods-SwiftyPicker.debug.xcconfig */,
137 | 9A4BC56973A2BB7973D26391 /* Pods-SwiftyPicker.release.xcconfig */,
138 | );
139 | name = Pods;
140 | sourceTree = "";
141 | };
142 | E774D5DD1BA7CF08009DEA14 /* SwiftyPicker */ = {
143 | isa = PBXGroup;
144 | children = (
145 | E774D5DE1BA7CF08009DEA14 /* AppDelegate.swift */,
146 | E774D5E01BA7CF08009DEA14 /* ViewController.swift */,
147 | E774D5E21BA7CF08009DEA14 /* Main.storyboard */,
148 | E774D5E51BA7CF08009DEA14 /* Assets.xcassets */,
149 | E774D5E71BA7CF08009DEA14 /* LaunchScreen.storyboard */,
150 | E774D5EA1BA7CF08009DEA14 /* Info.plist */,
151 | );
152 | path = SwiftyPicker;
153 | sourceTree = "";
154 | };
155 | E774D5F21BA7CF08009DEA14 /* SwiftyPickerTests */ = {
156 | isa = PBXGroup;
157 | children = (
158 | E774D5F31BA7CF08009DEA14 /* SwiftyPickerTests.swift */,
159 | E774D5F51BA7CF08009DEA14 /* Info.plist */,
160 | );
161 | path = SwiftyPickerTests;
162 | sourceTree = "";
163 | };
164 | E774D5FD1BA7CF08009DEA14 /* SwiftyPickerUITests */ = {
165 | isa = PBXGroup;
166 | children = (
167 | E774D5FE1BA7CF08009DEA14 /* SwiftyPickerUITests.swift */,
168 | E774D6001BA7CF08009DEA14 /* Info.plist */,
169 | );
170 | path = SwiftyPickerUITests;
171 | sourceTree = "";
172 | };
173 | E7D4BB121A33995200C98327 = {
174 | isa = PBXGroup;
175 | children = (
176 | E7D4BB1D1A33995200C98327 /* ColorPicker */,
177 | E7D4BB371A33995200C98327 /* ColorPickerTests */,
178 | E774D5DD1BA7CF08009DEA14 /* SwiftyPicker */,
179 | E774D5F21BA7CF08009DEA14 /* SwiftyPickerTests */,
180 | E774D5FD1BA7CF08009DEA14 /* SwiftyPickerUITests */,
181 | E7D4BB1C1A33995200C98327 /* Products */,
182 | EB0EA43EAC684E90F709D7AB /* Frameworks */,
183 | 26397613270C2C1DFD39E86C /* Pods */,
184 | );
185 | sourceTree = "";
186 | };
187 | E7D4BB1C1A33995200C98327 /* Products */ = {
188 | isa = PBXGroup;
189 | children = (
190 | E7D4BB1B1A33995200C98327 /* ColorPicker.app */,
191 | E7D4BB341A33995200C98327 /* ColorPickerTests.xctest */,
192 | E774D5DC1BA7CF08009DEA14 /* SwiftyPicker.app */,
193 | E774D5EF1BA7CF08009DEA14 /* SwiftyPickerTests.xctest */,
194 | E774D5FA1BA7CF08009DEA14 /* SwiftyPickerUITests.xctest */,
195 | );
196 | name = Products;
197 | sourceTree = "";
198 | };
199 | E7D4BB1D1A33995200C98327 /* ColorPicker */ = {
200 | isa = PBXGroup;
201 | children = (
202 | E7D4BB221A33995200C98327 /* AppDelegate.h */,
203 | E7D4BB231A33995200C98327 /* AppDelegate.m */,
204 | E7D4BB251A33995200C98327 /* ViewController.h */,
205 | E7D4BB261A33995200C98327 /* ViewController.m */,
206 | E7D4BB281A33995200C98327 /* Main.storyboard */,
207 | E7D4BB2B1A33995200C98327 /* Images.xcassets */,
208 | E7D4BB2D1A33995200C98327 /* LaunchScreen.xib */,
209 | E7D4BB1E1A33995200C98327 /* Supporting Files */,
210 | );
211 | path = ColorPicker;
212 | sourceTree = "";
213 | };
214 | E7D4BB1E1A33995200C98327 /* Supporting Files */ = {
215 | isa = PBXGroup;
216 | children = (
217 | E7D4BB1F1A33995200C98327 /* Info.plist */,
218 | E7D4BB201A33995200C98327 /* main.m */,
219 | );
220 | name = "Supporting Files";
221 | sourceTree = "";
222 | };
223 | E7D4BB371A33995200C98327 /* ColorPickerTests */ = {
224 | isa = PBXGroup;
225 | children = (
226 | E7D4BB3A1A33995200C98327 /* ColorPickerTests.m */,
227 | E7D4BB381A33995200C98327 /* Supporting Files */,
228 | );
229 | path = ColorPickerTests;
230 | sourceTree = "";
231 | };
232 | E7D4BB381A33995200C98327 /* Supporting Files */ = {
233 | isa = PBXGroup;
234 | children = (
235 | E7D4BB391A33995200C98327 /* Info.plist */,
236 | );
237 | name = "Supporting Files";
238 | sourceTree = "";
239 | };
240 | EB0EA43EAC684E90F709D7AB /* Frameworks */ = {
241 | isa = PBXGroup;
242 | children = (
243 | E703BACE1C056E910098A5D9 /* iOS_Color_Picker.framework */,
244 | F0B359BB80CA78216E3ABEBF /* libPods-ColorPicker.a */,
245 | EB99C0A8744ADBEBA001CC82 /* Pods_SwiftyPicker.framework */,
246 | );
247 | name = Frameworks;
248 | sourceTree = "";
249 | };
250 | /* End PBXGroup section */
251 |
252 | /* Begin PBXNativeTarget section */
253 | E774D5DB1BA7CF08009DEA14 /* SwiftyPicker */ = {
254 | isa = PBXNativeTarget;
255 | buildConfigurationList = E774D6071BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPicker" */;
256 | buildPhases = (
257 | 16EF10A6B47E7D31894E223A /* [CP] Check Pods Manifest.lock */,
258 | E774D5D81BA7CF08009DEA14 /* Sources */,
259 | E774D5D91BA7CF08009DEA14 /* Frameworks */,
260 | E774D5DA1BA7CF08009DEA14 /* Resources */,
261 | 84970201F89539D8F9012746 /* [CP] Embed Pods Frameworks */,
262 | );
263 | buildRules = (
264 | );
265 | dependencies = (
266 | );
267 | name = SwiftyPicker;
268 | productName = SwiftyPicker;
269 | productReference = E774D5DC1BA7CF08009DEA14 /* SwiftyPicker.app */;
270 | productType = "com.apple.product-type.application";
271 | };
272 | E774D5EE1BA7CF08009DEA14 /* SwiftyPickerTests */ = {
273 | isa = PBXNativeTarget;
274 | buildConfigurationList = E774D6081BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPickerTests" */;
275 | buildPhases = (
276 | E774D5EB1BA7CF08009DEA14 /* Sources */,
277 | E774D5EC1BA7CF08009DEA14 /* Frameworks */,
278 | E774D5ED1BA7CF08009DEA14 /* Resources */,
279 | );
280 | buildRules = (
281 | );
282 | dependencies = (
283 | E774D5F11BA7CF08009DEA14 /* PBXTargetDependency */,
284 | );
285 | name = SwiftyPickerTests;
286 | productName = SwiftyPickerTests;
287 | productReference = E774D5EF1BA7CF08009DEA14 /* SwiftyPickerTests.xctest */;
288 | productType = "com.apple.product-type.bundle.unit-test";
289 | };
290 | E774D5F91BA7CF08009DEA14 /* SwiftyPickerUITests */ = {
291 | isa = PBXNativeTarget;
292 | buildConfigurationList = E774D6091BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPickerUITests" */;
293 | buildPhases = (
294 | E774D5F61BA7CF08009DEA14 /* Sources */,
295 | E774D5F71BA7CF08009DEA14 /* Frameworks */,
296 | E774D5F81BA7CF08009DEA14 /* Resources */,
297 | );
298 | buildRules = (
299 | );
300 | dependencies = (
301 | E774D5FC1BA7CF08009DEA14 /* PBXTargetDependency */,
302 | );
303 | name = SwiftyPickerUITests;
304 | productName = SwiftyPickerUITests;
305 | productReference = E774D5FA1BA7CF08009DEA14 /* SwiftyPickerUITests.xctest */;
306 | productType = "com.apple.product-type.bundle.ui-testing";
307 | };
308 | E7D4BB1A1A33995200C98327 /* ColorPicker */ = {
309 | isa = PBXNativeTarget;
310 | buildConfigurationList = E7D4BB3E1A33995200C98327 /* Build configuration list for PBXNativeTarget "ColorPicker" */;
311 | buildPhases = (
312 | 0749143529B58ACEB4FD1009 /* [CP] Check Pods Manifest.lock */,
313 | E7D4BB171A33995200C98327 /* Sources */,
314 | E7D4BB181A33995200C98327 /* Frameworks */,
315 | E7D4BB191A33995200C98327 /* Resources */,
316 | E7776521F450690FAB085D07 /* [CP] Copy Pods Resources */,
317 | );
318 | buildRules = (
319 | );
320 | dependencies = (
321 | );
322 | name = ColorPicker;
323 | productName = ColorPicker;
324 | productReference = E7D4BB1B1A33995200C98327 /* ColorPicker.app */;
325 | productType = "com.apple.product-type.application";
326 | };
327 | E7D4BB331A33995200C98327 /* ColorPickerTests */ = {
328 | isa = PBXNativeTarget;
329 | buildConfigurationList = E7D4BB411A33995200C98327 /* Build configuration list for PBXNativeTarget "ColorPickerTests" */;
330 | buildPhases = (
331 | E7D4BB301A33995200C98327 /* Sources */,
332 | E7D4BB311A33995200C98327 /* Frameworks */,
333 | E7D4BB321A33995200C98327 /* Resources */,
334 | );
335 | buildRules = (
336 | );
337 | dependencies = (
338 | E7D4BB361A33995200C98327 /* PBXTargetDependency */,
339 | );
340 | name = ColorPickerTests;
341 | productName = ColorPickerTests;
342 | productReference = E7D4BB341A33995200C98327 /* ColorPickerTests.xctest */;
343 | productType = "com.apple.product-type.bundle.unit-test";
344 | };
345 | /* End PBXNativeTarget section */
346 |
347 | /* Begin PBXProject section */
348 | E7D4BB131A33995200C98327 /* Project object */ = {
349 | isa = PBXProject;
350 | attributes = {
351 | LastSwiftUpdateCheck = 0710;
352 | LastUpgradeCheck = 0930;
353 | ORGANIZATIONNAME = "Fabián Cañas";
354 | TargetAttributes = {
355 | E774D5DB1BA7CF08009DEA14 = {
356 | CreatedOnToolsVersion = 7.0;
357 | };
358 | E774D5EE1BA7CF08009DEA14 = {
359 | CreatedOnToolsVersion = 7.0;
360 | TestTargetID = E774D5DB1BA7CF08009DEA14;
361 | };
362 | E774D5F91BA7CF08009DEA14 = {
363 | CreatedOnToolsVersion = 7.0;
364 | TestTargetID = E774D5DB1BA7CF08009DEA14;
365 | };
366 | E7D4BB1A1A33995200C98327 = {
367 | CreatedOnToolsVersion = 6.1;
368 | };
369 | E7D4BB331A33995200C98327 = {
370 | CreatedOnToolsVersion = 6.1;
371 | TestTargetID = E7D4BB1A1A33995200C98327;
372 | };
373 | };
374 | };
375 | buildConfigurationList = E7D4BB161A33995200C98327 /* Build configuration list for PBXProject "ColorPicker" */;
376 | compatibilityVersion = "Xcode 3.2";
377 | developmentRegion = English;
378 | hasScannedForEncodings = 0;
379 | knownRegions = (
380 | en,
381 | Base,
382 | );
383 | mainGroup = E7D4BB121A33995200C98327;
384 | productRefGroup = E7D4BB1C1A33995200C98327 /* Products */;
385 | projectDirPath = "";
386 | projectRoot = "";
387 | targets = (
388 | E7D4BB1A1A33995200C98327 /* ColorPicker */,
389 | E7D4BB331A33995200C98327 /* ColorPickerTests */,
390 | E774D5DB1BA7CF08009DEA14 /* SwiftyPicker */,
391 | E774D5EE1BA7CF08009DEA14 /* SwiftyPickerTests */,
392 | E774D5F91BA7CF08009DEA14 /* SwiftyPickerUITests */,
393 | );
394 | };
395 | /* End PBXProject section */
396 |
397 | /* Begin PBXResourcesBuildPhase section */
398 | E774D5DA1BA7CF08009DEA14 /* Resources */ = {
399 | isa = PBXResourcesBuildPhase;
400 | buildActionMask = 2147483647;
401 | files = (
402 | E774D5E91BA7CF08009DEA14 /* LaunchScreen.storyboard in Resources */,
403 | E774D5E61BA7CF08009DEA14 /* Assets.xcassets in Resources */,
404 | E774D5E41BA7CF08009DEA14 /* Main.storyboard in Resources */,
405 | );
406 | runOnlyForDeploymentPostprocessing = 0;
407 | };
408 | E774D5ED1BA7CF08009DEA14 /* Resources */ = {
409 | isa = PBXResourcesBuildPhase;
410 | buildActionMask = 2147483647;
411 | files = (
412 | );
413 | runOnlyForDeploymentPostprocessing = 0;
414 | };
415 | E774D5F81BA7CF08009DEA14 /* Resources */ = {
416 | isa = PBXResourcesBuildPhase;
417 | buildActionMask = 2147483647;
418 | files = (
419 | );
420 | runOnlyForDeploymentPostprocessing = 0;
421 | };
422 | E7D4BB191A33995200C98327 /* Resources */ = {
423 | isa = PBXResourcesBuildPhase;
424 | buildActionMask = 2147483647;
425 | files = (
426 | E7D4BB2A1A33995200C98327 /* Main.storyboard in Resources */,
427 | E7D4BB2F1A33995200C98327 /* LaunchScreen.xib in Resources */,
428 | E7D4BB2C1A33995200C98327 /* Images.xcassets in Resources */,
429 | );
430 | runOnlyForDeploymentPostprocessing = 0;
431 | };
432 | E7D4BB321A33995200C98327 /* Resources */ = {
433 | isa = PBXResourcesBuildPhase;
434 | buildActionMask = 2147483647;
435 | files = (
436 | );
437 | runOnlyForDeploymentPostprocessing = 0;
438 | };
439 | /* End PBXResourcesBuildPhase section */
440 |
441 | /* Begin PBXShellScriptBuildPhase section */
442 | 0749143529B58ACEB4FD1009 /* [CP] Check Pods Manifest.lock */ = {
443 | isa = PBXShellScriptBuildPhase;
444 | buildActionMask = 2147483647;
445 | files = (
446 | );
447 | inputPaths = (
448 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
449 | "${PODS_ROOT}/Manifest.lock",
450 | );
451 | name = "[CP] Check Pods Manifest.lock";
452 | outputPaths = (
453 | "$(DERIVED_FILE_DIR)/Pods-ColorPicker-checkManifestLockResult.txt",
454 | );
455 | runOnlyForDeploymentPostprocessing = 0;
456 | shellPath = /bin/sh;
457 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
458 | showEnvVarsInLog = 0;
459 | };
460 | 16EF10A6B47E7D31894E223A /* [CP] Check Pods Manifest.lock */ = {
461 | isa = PBXShellScriptBuildPhase;
462 | buildActionMask = 2147483647;
463 | files = (
464 | );
465 | inputPaths = (
466 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
467 | "${PODS_ROOT}/Manifest.lock",
468 | );
469 | name = "[CP] Check Pods Manifest.lock";
470 | outputPaths = (
471 | "$(DERIVED_FILE_DIR)/Pods-SwiftyPicker-checkManifestLockResult.txt",
472 | );
473 | runOnlyForDeploymentPostprocessing = 0;
474 | shellPath = /bin/sh;
475 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
476 | showEnvVarsInLog = 0;
477 | };
478 | 84970201F89539D8F9012746 /* [CP] Embed Pods Frameworks */ = {
479 | isa = PBXShellScriptBuildPhase;
480 | buildActionMask = 2147483647;
481 | files = (
482 | );
483 | inputPaths = (
484 | "${SRCROOT}/Pods/Target Support Files/Pods-SwiftyPicker/Pods-SwiftyPicker-frameworks.sh",
485 | "${BUILT_PRODUCTS_DIR}/iOS-Color-Picker-framework/iOS_Color_Picker.framework",
486 | );
487 | name = "[CP] Embed Pods Frameworks";
488 | outputPaths = (
489 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iOS_Color_Picker.framework",
490 | );
491 | runOnlyForDeploymentPostprocessing = 0;
492 | shellPath = /bin/sh;
493 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftyPicker/Pods-SwiftyPicker-frameworks.sh\"\n";
494 | showEnvVarsInLog = 0;
495 | };
496 | E7776521F450690FAB085D07 /* [CP] Copy Pods Resources */ = {
497 | isa = PBXShellScriptBuildPhase;
498 | buildActionMask = 2147483647;
499 | files = (
500 | );
501 | inputPaths = (
502 | "${SRCROOT}/Pods/Target Support Files/Pods-ColorPicker/Pods-ColorPicker-resources.sh",
503 | "${PODS_ROOT}/../../Resources/colormap.png",
504 | "${PODS_ROOT}/../../FCColorPickerViewController.xib",
505 | );
506 | name = "[CP] Copy Pods Resources";
507 | outputPaths = (
508 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/colormap.png",
509 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FCColorPickerViewController.nib",
510 | );
511 | runOnlyForDeploymentPostprocessing = 0;
512 | shellPath = /bin/sh;
513 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ColorPicker/Pods-ColorPicker-resources.sh\"\n";
514 | showEnvVarsInLog = 0;
515 | };
516 | /* End PBXShellScriptBuildPhase section */
517 |
518 | /* Begin PBXSourcesBuildPhase section */
519 | E774D5D81BA7CF08009DEA14 /* Sources */ = {
520 | isa = PBXSourcesBuildPhase;
521 | buildActionMask = 2147483647;
522 | files = (
523 | E774D5E11BA7CF08009DEA14 /* ViewController.swift in Sources */,
524 | E774D5DF1BA7CF08009DEA14 /* AppDelegate.swift in Sources */,
525 | );
526 | runOnlyForDeploymentPostprocessing = 0;
527 | };
528 | E774D5EB1BA7CF08009DEA14 /* Sources */ = {
529 | isa = PBXSourcesBuildPhase;
530 | buildActionMask = 2147483647;
531 | files = (
532 | E774D5F41BA7CF08009DEA14 /* SwiftyPickerTests.swift in Sources */,
533 | );
534 | runOnlyForDeploymentPostprocessing = 0;
535 | };
536 | E774D5F61BA7CF08009DEA14 /* Sources */ = {
537 | isa = PBXSourcesBuildPhase;
538 | buildActionMask = 2147483647;
539 | files = (
540 | E774D5FF1BA7CF08009DEA14 /* SwiftyPickerUITests.swift in Sources */,
541 | );
542 | runOnlyForDeploymentPostprocessing = 0;
543 | };
544 | E7D4BB171A33995200C98327 /* Sources */ = {
545 | isa = PBXSourcesBuildPhase;
546 | buildActionMask = 2147483647;
547 | files = (
548 | E7D4BB271A33995200C98327 /* ViewController.m in Sources */,
549 | E7D4BB241A33995200C98327 /* AppDelegate.m in Sources */,
550 | E7D4BB211A33995200C98327 /* main.m in Sources */,
551 | );
552 | runOnlyForDeploymentPostprocessing = 0;
553 | };
554 | E7D4BB301A33995200C98327 /* Sources */ = {
555 | isa = PBXSourcesBuildPhase;
556 | buildActionMask = 2147483647;
557 | files = (
558 | E7D4BB3B1A33995200C98327 /* ColorPickerTests.m in Sources */,
559 | );
560 | runOnlyForDeploymentPostprocessing = 0;
561 | };
562 | /* End PBXSourcesBuildPhase section */
563 |
564 | /* Begin PBXTargetDependency section */
565 | E774D5F11BA7CF08009DEA14 /* PBXTargetDependency */ = {
566 | isa = PBXTargetDependency;
567 | target = E774D5DB1BA7CF08009DEA14 /* SwiftyPicker */;
568 | targetProxy = E774D5F01BA7CF08009DEA14 /* PBXContainerItemProxy */;
569 | };
570 | E774D5FC1BA7CF08009DEA14 /* PBXTargetDependency */ = {
571 | isa = PBXTargetDependency;
572 | target = E774D5DB1BA7CF08009DEA14 /* SwiftyPicker */;
573 | targetProxy = E774D5FB1BA7CF08009DEA14 /* PBXContainerItemProxy */;
574 | };
575 | E7D4BB361A33995200C98327 /* PBXTargetDependency */ = {
576 | isa = PBXTargetDependency;
577 | target = E7D4BB1A1A33995200C98327 /* ColorPicker */;
578 | targetProxy = E7D4BB351A33995200C98327 /* PBXContainerItemProxy */;
579 | };
580 | /* End PBXTargetDependency section */
581 |
582 | /* Begin PBXVariantGroup section */
583 | E774D5E21BA7CF08009DEA14 /* Main.storyboard */ = {
584 | isa = PBXVariantGroup;
585 | children = (
586 | E774D5E31BA7CF08009DEA14 /* Base */,
587 | );
588 | name = Main.storyboard;
589 | sourceTree = "";
590 | };
591 | E774D5E71BA7CF08009DEA14 /* LaunchScreen.storyboard */ = {
592 | isa = PBXVariantGroup;
593 | children = (
594 | E774D5E81BA7CF08009DEA14 /* Base */,
595 | );
596 | name = LaunchScreen.storyboard;
597 | sourceTree = "";
598 | };
599 | E7D4BB281A33995200C98327 /* Main.storyboard */ = {
600 | isa = PBXVariantGroup;
601 | children = (
602 | E7D4BB291A33995200C98327 /* Base */,
603 | );
604 | name = Main.storyboard;
605 | sourceTree = "";
606 | };
607 | E7D4BB2D1A33995200C98327 /* LaunchScreen.xib */ = {
608 | isa = PBXVariantGroup;
609 | children = (
610 | E7D4BB2E1A33995200C98327 /* Base */,
611 | );
612 | name = LaunchScreen.xib;
613 | sourceTree = "";
614 | };
615 | /* End PBXVariantGroup section */
616 |
617 | /* Begin XCBuildConfiguration section */
618 | E774D6011BA7CF08009DEA14 /* Debug */ = {
619 | isa = XCBuildConfiguration;
620 | baseConfigurationReference = 40496FC580E12B316DDF225B /* Pods-SwiftyPicker.debug.xcconfig */;
621 | buildSettings = {
622 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
623 | DEBUG_INFORMATION_FORMAT = dwarf;
624 | ENABLE_TESTABILITY = YES;
625 | INFOPLIST_FILE = SwiftyPicker/Info.plist;
626 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
627 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPicker;
628 | PRODUCT_NAME = "$(TARGET_NAME)";
629 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
630 | SWIFT_VERSION = 4.0;
631 | TARGETED_DEVICE_FAMILY = "1,2";
632 | };
633 | name = Debug;
634 | };
635 | E774D6021BA7CF08009DEA14 /* Release */ = {
636 | isa = XCBuildConfiguration;
637 | baseConfigurationReference = 9A4BC56973A2BB7973D26391 /* Pods-SwiftyPicker.release.xcconfig */;
638 | buildSettings = {
639 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
640 | COPY_PHASE_STRIP = NO;
641 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
642 | INFOPLIST_FILE = SwiftyPicker/Info.plist;
643 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
644 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPicker;
645 | PRODUCT_NAME = "$(TARGET_NAME)";
646 | SWIFT_VERSION = 4.0;
647 | TARGETED_DEVICE_FAMILY = "1,2";
648 | };
649 | name = Release;
650 | };
651 | E774D6031BA7CF08009DEA14 /* Debug */ = {
652 | isa = XCBuildConfiguration;
653 | buildSettings = {
654 | BUNDLE_LOADER = "$(TEST_HOST)";
655 | DEBUG_INFORMATION_FORMAT = dwarf;
656 | ENABLE_TESTABILITY = YES;
657 | GCC_NO_COMMON_BLOCKS = YES;
658 | INFOPLIST_FILE = SwiftyPickerTests/Info.plist;
659 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
660 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
661 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPickerTests;
662 | PRODUCT_NAME = "$(TARGET_NAME)";
663 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftyPicker.app/SwiftyPicker";
664 | };
665 | name = Debug;
666 | };
667 | E774D6041BA7CF08009DEA14 /* Release */ = {
668 | isa = XCBuildConfiguration;
669 | buildSettings = {
670 | BUNDLE_LOADER = "$(TEST_HOST)";
671 | COPY_PHASE_STRIP = NO;
672 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
673 | GCC_NO_COMMON_BLOCKS = YES;
674 | INFOPLIST_FILE = SwiftyPickerTests/Info.plist;
675 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
676 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
677 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPickerTests;
678 | PRODUCT_NAME = "$(TARGET_NAME)";
679 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftyPicker.app/SwiftyPicker";
680 | };
681 | name = Release;
682 | };
683 | E774D6051BA7CF08009DEA14 /* Debug */ = {
684 | isa = XCBuildConfiguration;
685 | buildSettings = {
686 | DEBUG_INFORMATION_FORMAT = dwarf;
687 | ENABLE_TESTABILITY = YES;
688 | GCC_NO_COMMON_BLOCKS = YES;
689 | INFOPLIST_FILE = SwiftyPickerUITests/Info.plist;
690 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
691 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
692 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPickerUITests;
693 | PRODUCT_NAME = "$(TARGET_NAME)";
694 | TEST_TARGET_NAME = SwiftyPicker;
695 | USES_XCTRUNNER = YES;
696 | };
697 | name = Debug;
698 | };
699 | E774D6061BA7CF08009DEA14 /* Release */ = {
700 | isa = XCBuildConfiguration;
701 | buildSettings = {
702 | COPY_PHASE_STRIP = NO;
703 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
704 | GCC_NO_COMMON_BLOCKS = YES;
705 | INFOPLIST_FILE = SwiftyPickerUITests/Info.plist;
706 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
707 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
708 | PRODUCT_BUNDLE_IDENTIFIER = com.fabiancanas.SwiftyPickerUITests;
709 | PRODUCT_NAME = "$(TARGET_NAME)";
710 | TEST_TARGET_NAME = SwiftyPicker;
711 | USES_XCTRUNNER = YES;
712 | };
713 | name = Release;
714 | };
715 | E7D4BB3C1A33995200C98327 /* Debug */ = {
716 | isa = XCBuildConfiguration;
717 | buildSettings = {
718 | ALWAYS_SEARCH_USER_PATHS = NO;
719 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
720 | CLANG_CXX_LIBRARY = "libc++";
721 | CLANG_ENABLE_MODULES = YES;
722 | CLANG_ENABLE_OBJC_ARC = YES;
723 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
724 | CLANG_WARN_BOOL_CONVERSION = YES;
725 | CLANG_WARN_COMMA = YES;
726 | CLANG_WARN_CONSTANT_CONVERSION = YES;
727 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
728 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
729 | CLANG_WARN_EMPTY_BODY = YES;
730 | CLANG_WARN_ENUM_CONVERSION = YES;
731 | CLANG_WARN_INFINITE_RECURSION = YES;
732 | CLANG_WARN_INT_CONVERSION = YES;
733 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
734 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
735 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
736 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
737 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
738 | CLANG_WARN_STRICT_PROTOTYPES = YES;
739 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
740 | CLANG_WARN_UNREACHABLE_CODE = YES;
741 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
742 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
743 | COPY_PHASE_STRIP = NO;
744 | ENABLE_STRICT_OBJC_MSGSEND = YES;
745 | ENABLE_TESTABILITY = YES;
746 | GCC_C_LANGUAGE_STANDARD = gnu99;
747 | GCC_DYNAMIC_NO_PIC = NO;
748 | GCC_NO_COMMON_BLOCKS = YES;
749 | GCC_OPTIMIZATION_LEVEL = 0;
750 | GCC_PREPROCESSOR_DEFINITIONS = (
751 | "DEBUG=1",
752 | "$(inherited)",
753 | );
754 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
755 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
756 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
757 | GCC_WARN_UNDECLARED_SELECTOR = YES;
758 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
759 | GCC_WARN_UNUSED_FUNCTION = YES;
760 | GCC_WARN_UNUSED_VARIABLE = YES;
761 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
762 | MTL_ENABLE_DEBUG_INFO = YES;
763 | ONLY_ACTIVE_ARCH = YES;
764 | SDKROOT = iphoneos;
765 | };
766 | name = Debug;
767 | };
768 | E7D4BB3D1A33995200C98327 /* Release */ = {
769 | isa = XCBuildConfiguration;
770 | buildSettings = {
771 | ALWAYS_SEARCH_USER_PATHS = NO;
772 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
773 | CLANG_CXX_LIBRARY = "libc++";
774 | CLANG_ENABLE_MODULES = YES;
775 | CLANG_ENABLE_OBJC_ARC = YES;
776 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
777 | CLANG_WARN_BOOL_CONVERSION = YES;
778 | CLANG_WARN_COMMA = YES;
779 | CLANG_WARN_CONSTANT_CONVERSION = YES;
780 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
781 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
782 | CLANG_WARN_EMPTY_BODY = YES;
783 | CLANG_WARN_ENUM_CONVERSION = YES;
784 | CLANG_WARN_INFINITE_RECURSION = YES;
785 | CLANG_WARN_INT_CONVERSION = YES;
786 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
787 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
788 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
789 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
790 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
791 | CLANG_WARN_STRICT_PROTOTYPES = YES;
792 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
793 | CLANG_WARN_UNREACHABLE_CODE = YES;
794 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
795 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
796 | COPY_PHASE_STRIP = YES;
797 | ENABLE_NS_ASSERTIONS = NO;
798 | ENABLE_STRICT_OBJC_MSGSEND = YES;
799 | GCC_C_LANGUAGE_STANDARD = gnu99;
800 | GCC_NO_COMMON_BLOCKS = YES;
801 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
802 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
803 | GCC_WARN_UNDECLARED_SELECTOR = YES;
804 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
805 | GCC_WARN_UNUSED_FUNCTION = YES;
806 | GCC_WARN_UNUSED_VARIABLE = YES;
807 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
808 | MTL_ENABLE_DEBUG_INFO = NO;
809 | SDKROOT = iphoneos;
810 | SWIFT_COMPILATION_MODE = wholemodule;
811 | VALIDATE_PRODUCT = YES;
812 | };
813 | name = Release;
814 | };
815 | E7D4BB3F1A33995200C98327 /* Debug */ = {
816 | isa = XCBuildConfiguration;
817 | baseConfigurationReference = CA49524B6F78A368452D6FB5 /* Pods-ColorPicker.debug.xcconfig */;
818 | buildSettings = {
819 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
820 | INFOPLIST_FILE = ColorPicker/Info.plist;
821 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
822 | PRODUCT_BUNDLE_IDENTIFIER = "com.fabiancanas.$(PRODUCT_NAME:rfc1034identifier)";
823 | PRODUCT_NAME = "$(TARGET_NAME)";
824 | TARGETED_DEVICE_FAMILY = "1,2";
825 | };
826 | name = Debug;
827 | };
828 | E7D4BB401A33995200C98327 /* Release */ = {
829 | isa = XCBuildConfiguration;
830 | baseConfigurationReference = 2371BD0567C177ECF3B531E0 /* Pods-ColorPicker.release.xcconfig */;
831 | buildSettings = {
832 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
833 | INFOPLIST_FILE = ColorPicker/Info.plist;
834 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
835 | PRODUCT_BUNDLE_IDENTIFIER = "com.fabiancanas.$(PRODUCT_NAME:rfc1034identifier)";
836 | PRODUCT_NAME = "$(TARGET_NAME)";
837 | TARGETED_DEVICE_FAMILY = "1,2";
838 | };
839 | name = Release;
840 | };
841 | E7D4BB421A33995200C98327 /* Debug */ = {
842 | isa = XCBuildConfiguration;
843 | buildSettings = {
844 | BUNDLE_LOADER = "$(TEST_HOST)";
845 | FRAMEWORK_SEARCH_PATHS = (
846 | "$(SDKROOT)/Developer/Library/Frameworks",
847 | "$(inherited)",
848 | );
849 | GCC_PREPROCESSOR_DEFINITIONS = (
850 | "DEBUG=1",
851 | "$(inherited)",
852 | );
853 | INFOPLIST_FILE = ColorPickerTests/Info.plist;
854 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
855 | PRODUCT_BUNDLE_IDENTIFIER = "com.fabiancanas.$(PRODUCT_NAME:rfc1034identifier)";
856 | PRODUCT_NAME = "$(TARGET_NAME)";
857 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ColorPicker.app/ColorPicker";
858 | };
859 | name = Debug;
860 | };
861 | E7D4BB431A33995200C98327 /* Release */ = {
862 | isa = XCBuildConfiguration;
863 | buildSettings = {
864 | BUNDLE_LOADER = "$(TEST_HOST)";
865 | FRAMEWORK_SEARCH_PATHS = (
866 | "$(SDKROOT)/Developer/Library/Frameworks",
867 | "$(inherited)",
868 | );
869 | INFOPLIST_FILE = ColorPickerTests/Info.plist;
870 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
871 | PRODUCT_BUNDLE_IDENTIFIER = "com.fabiancanas.$(PRODUCT_NAME:rfc1034identifier)";
872 | PRODUCT_NAME = "$(TARGET_NAME)";
873 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ColorPicker.app/ColorPicker";
874 | };
875 | name = Release;
876 | };
877 | /* End XCBuildConfiguration section */
878 |
879 | /* Begin XCConfigurationList section */
880 | E774D6071BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPicker" */ = {
881 | isa = XCConfigurationList;
882 | buildConfigurations = (
883 | E774D6011BA7CF08009DEA14 /* Debug */,
884 | E774D6021BA7CF08009DEA14 /* Release */,
885 | );
886 | defaultConfigurationIsVisible = 0;
887 | defaultConfigurationName = Release;
888 | };
889 | E774D6081BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPickerTests" */ = {
890 | isa = XCConfigurationList;
891 | buildConfigurations = (
892 | E774D6031BA7CF08009DEA14 /* Debug */,
893 | E774D6041BA7CF08009DEA14 /* Release */,
894 | );
895 | defaultConfigurationIsVisible = 0;
896 | defaultConfigurationName = Release;
897 | };
898 | E774D6091BA7CF08009DEA14 /* Build configuration list for PBXNativeTarget "SwiftyPickerUITests" */ = {
899 | isa = XCConfigurationList;
900 | buildConfigurations = (
901 | E774D6051BA7CF08009DEA14 /* Debug */,
902 | E774D6061BA7CF08009DEA14 /* Release */,
903 | );
904 | defaultConfigurationIsVisible = 0;
905 | defaultConfigurationName = Release;
906 | };
907 | E7D4BB161A33995200C98327 /* Build configuration list for PBXProject "ColorPicker" */ = {
908 | isa = XCConfigurationList;
909 | buildConfigurations = (
910 | E7D4BB3C1A33995200C98327 /* Debug */,
911 | E7D4BB3D1A33995200C98327 /* Release */,
912 | );
913 | defaultConfigurationIsVisible = 0;
914 | defaultConfigurationName = Release;
915 | };
916 | E7D4BB3E1A33995200C98327 /* Build configuration list for PBXNativeTarget "ColorPicker" */ = {
917 | isa = XCConfigurationList;
918 | buildConfigurations = (
919 | E7D4BB3F1A33995200C98327 /* Debug */,
920 | E7D4BB401A33995200C98327 /* Release */,
921 | );
922 | defaultConfigurationIsVisible = 0;
923 | defaultConfigurationName = Release;
924 | };
925 | E7D4BB411A33995200C98327 /* Build configuration list for PBXNativeTarget "ColorPickerTests" */ = {
926 | isa = XCConfigurationList;
927 | buildConfigurations = (
928 | E7D4BB421A33995200C98327 /* Debug */,
929 | E7D4BB431A33995200C98327 /* Release */,
930 | );
931 | defaultConfigurationIsVisible = 0;
932 | defaultConfigurationName = Release;
933 | };
934 | /* End XCConfigurationList section */
935 | };
936 | rootObject = E7D4BB131A33995200C98327 /* Project object */;
937 | }
938 |
--------------------------------------------------------------------------------