├── .DS_Store
├── SCPopDatePicker
├── Assets.xcassets
│ ├── Contents.json
│ ├── search.imageset
│ │ ├── search.jpg
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── ViewController.swift
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── AppDelegate.swift
└── SCPopDatePicker.swift
├── SCPopDatePicker.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── stewartcrainie.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcuserdata
│ └── stewartcrainie.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── SCPopDatePicker.xcscheme
└── project.pbxproj
├── SCPopDatePickerTests
├── Info.plist
└── SCPopDatePickerTests.swift
├── SCPopDatePickerUITests
├── Info.plist
└── SCPopDatePickerUITests.swift
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scrainie/SCPopDatePicker/HEAD/.DS_Store
--------------------------------------------------------------------------------
/SCPopDatePicker/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SCPopDatePicker/Assets.xcassets/search.imageset/search.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scrainie/SCPopDatePicker/HEAD/SCPopDatePicker/Assets.xcassets/search.imageset/search.jpg
--------------------------------------------------------------------------------
/SCPopDatePicker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SCPopDatePicker.xcodeproj/project.xcworkspace/xcuserdata/stewartcrainie.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scrainie/SCPopDatePicker/HEAD/SCPopDatePicker.xcodeproj/project.xcworkspace/xcuserdata/stewartcrainie.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SCPopDatePicker/Assets.xcassets/search.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "search.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SCPopDatePicker/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 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/SCPopDatePickerTests/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 |
--------------------------------------------------------------------------------
/SCPopDatePickerUITests/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 |
--------------------------------------------------------------------------------
/SCPopDatePicker.xcodeproj/xcuserdata/stewartcrainie.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SCPopDatePicker.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A2405B661D86CF8E00868D10
16 |
17 | primary
18 |
19 |
20 | A2405B7A1D86CF8F00868D10
21 |
22 | primary
23 |
24 |
25 | A2405B851D86CF8F00868D10
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/SCPopDatePickerTests/SCPopDatePickerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SCPopDatePickerTests.swift
3 | // SCPopDatePickerTests
4 | //
5 | // Created by Stewart Crainie on 12/09/2016.
6 | // Copyright © 2016 Stewart Crainie. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import SCPopDatePicker
11 |
12 | class SCPopDatePickerTests: 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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SCPopDatePicker
2 | Simple UIDatePicker -> Requires Swift 3.0
3 |
4 | 1. Drag and drop SCPopDatePicker.swift into project.
5 | 2. Add SCPopDatePickerDelegate to ViewController
6 |
7 | #Usage
8 | ```Swift
9 | let datePicker = SCPopDatePicker()
10 | datePicker.tapToDismiss = true //Optional
11 | datePicker.datePickerType = SCDatePickerType.date //Optional
12 | datePicker.showBlur = true // Optional
13 | datePicker.btnFontColour = UIColor.redColor() //Optional
14 | datePicker.delegate = self
15 | datePicker.show(attachToView: self.view)
16 | ```
17 | #Delegate Protocol
18 |
19 | ```Swift
20 | func scPopDatePickerDidSelectDate(date: NSDate) {
21 |
22 | //returns NSDate
23 | }
24 | ```
25 | #Optionals
26 | ```Swift
27 | public var showBlur = true //Default Yes
28 | public var datePickerType: SCDatePickerType!
29 | public var tapToDismiss = true //Default Yes
30 | public var btnFontColour = UIColor.blueColor() //Default Blue
31 | public var btnColour = UIColor.clearColor() //Default Clear
32 | public var datePickerStartDate = NSDate() //Optional
33 | public var showShadow = true //Optional
34 | public var showCornerRadius = true // Optional
35 | ```
36 |
--------------------------------------------------------------------------------
/SCPopDatePicker/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 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/SCPopDatePickerUITests/SCPopDatePickerUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SCPopDatePickerUITests.swift
3 | // SCPopDatePickerUITests
4 | //
5 | // Created by Stewart Crainie on 12/09/2016.
6 | // Copyright © 2016 Stewart Crainie. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class SCPopDatePickerUITests: 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 |
--------------------------------------------------------------------------------
/SCPopDatePicker/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SCPopDatePicker
4 | //
5 | // Created by Stewart Crainie on 12/09/2016.
6 | // Copyright © 2016 Stewart Crainie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController, SCPopDatePickerDelegate {
12 |
13 |
14 | let datePicker = SCPopDatePicker()
15 | let date = Date()
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | // Do any additional setup after loading the view, typically from a nib.
20 |
21 | }
22 |
23 | @IBAction func showDatePicker(sender: UIButton) {
24 |
25 | self.datePicker.tapToDismiss = true
26 | self.datePicker.datePickerType = SCDatePickerType.date
27 | self.datePicker.showBlur = true
28 | self.datePicker.datePickerStartDate = self.date
29 | self.datePicker.btnFontColour = UIColor.white
30 | self.datePicker.btnColour = UIColor.darkGray
31 | self.datePicker.showCornerRadius = false
32 | self.datePicker.delegate = self
33 | self.datePicker.show(attachToView: self.view)
34 |
35 |
36 | }
37 |
38 | override func viewDidAppear(_ animated: Bool) {
39 | super.viewDidAppear(true)
40 |
41 | }
42 |
43 | func scPopDatePickerDidSelectDate(_ date: Date) {
44 | print(date)
45 | }
46 |
47 | override func didReceiveMemoryWarning() {
48 | super.didReceiveMemoryWarning()
49 | // Dispose of any resources that can be recreated.
50 | }
51 |
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/SCPopDatePicker/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 |
--------------------------------------------------------------------------------
/SCPopDatePicker/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SCPopDatePicker
4 | //
5 | // Created by Stewart Crainie on 12/09/2016.
6 | // Copyright © 2016 Stewart Crainie. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/SCPopDatePicker/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/SCPopDatePicker.xcodeproj/xcuserdata/stewartcrainie.xcuserdatad/xcschemes/SCPopDatePicker.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/SCPopDatePicker/SCPopDatePicker.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol SCPopDatePickerDelegate: NSObjectProtocol {
4 | func scPopDatePickerDidSelectDate(_ date: Date)
5 | }
6 |
7 |
8 | //DatePicker Mode
9 | public enum SCDatePickerType {
10 | case date, time, countdown
11 | public func dateType() -> UIDatePickerMode {
12 | switch self {
13 | case SCDatePickerType.date: return .date
14 | case SCDatePickerType.time: return .dateAndTime
15 | case SCDatePickerType.countdown: return .countDownTimer
16 | }
17 | }
18 | }
19 |
20 | open class SCPopDatePicker: UIView, UIGestureRecognizerDelegate {
21 |
22 | //Delegate
23 | var delegate: SCPopDatePickerDelegate?
24 |
25 | //Properties
26 | fileprivate var containerView: UIView!
27 | fileprivate var contentView: UIView!
28 | fileprivate var backgroundView: UIView!
29 | fileprivate var datePickerView: UIDatePicker!
30 |
31 | //Custom Properties
32 | open var showBlur = true //Default Yes
33 | open var datePickerType: SCDatePickerType!
34 | open var tapToDismiss = true //Default Yes
35 | open var btnFontColour = UIColor.blue //Default Blue
36 | open var btnColour = UIColor.clear //Default Clear
37 | open var datePickerStartDate = Date() //Optional
38 | open var showShadow = true //Optional
39 | open var showCornerRadius = true // Optional
40 |
41 |
42 | public init() {
43 | super.init(frame: CGRect.zero)
44 | self.backgroundColor = UIColor.clear
45 |
46 | }
47 |
48 |
49 |
50 | open func show(attachToView view: UIView) {
51 | self.show(self, inView: view)
52 | }
53 |
54 | //Show View
55 | fileprivate func show(_ contentView: UIView, inView: UIView) {
56 |
57 | self.contentView = inView
58 |
59 | self.containerView = UIView()
60 | self.containerView.frame = CGRect(x: 0, y: 0, width: inView.bounds.width, height: inView.bounds.height)
61 | self.containerView.backgroundColor = UIColor.clear
62 | self.containerView.alpha = 0
63 |
64 | self.contentView.addSubview(self.containerView)
65 |
66 |
67 | if showBlur {
68 | _showBlur()
69 | }
70 |
71 | self.backgroundView = createBackgroundView()
72 | self.containerView.addSubview(self.backgroundView)
73 |
74 | self.datePickerView = createDatePicker()
75 | self.backgroundView.addSubview(self.datePickerView)
76 |
77 | //Round .Left / .Right Corners of DatePicker View
78 | if showCornerRadius {
79 | let path = UIBezierPath(roundedRect:self.datePickerView.bounds, byRoundingCorners:[.topRight, .topLeft], cornerRadii: CGSize(width: 10, height: 10))
80 | let maskLayer = CAShapeLayer()
81 |
82 | maskLayer.path = path.cgPath
83 | self.datePickerView.layer.mask = maskLayer
84 | }
85 |
86 | self.backgroundView.addSubview(self.addSelectButton())
87 |
88 |
89 | //Show UI Views
90 | UIView.animate(withDuration: 0.15, animations: {
91 | self.containerView.alpha = 1
92 | }, completion: { (success:Bool) in
93 | UIView.animate(withDuration: 0.30, delay: 0, options: .transitionCrossDissolve, animations: {
94 | self.backgroundView.frame.origin.y = self.containerView.bounds.height / 2 - 125
95 | }, completion: { (success:Bool) in
96 |
97 | })
98 | })
99 |
100 | if tapToDismiss {
101 | let tap = UITapGestureRecognizer(target: self, action: #selector(SCPopDatePicker.dismiss(_:)))
102 | tap.delegate = self
103 | self.containerView.addGestureRecognizer(tap)
104 | }
105 |
106 | self.layoutSubviews()
107 | }
108 |
109 |
110 | //Handle Tap Dismiss
111 | func dismiss(_ sender: UITapGestureRecognizer? = nil) {
112 |
113 | UIView.animate(withDuration: 0.15, animations: {
114 | self.backgroundView.frame.origin.y += self.containerView.bounds.maxY
115 | }, completion: { (success:Bool) in
116 |
117 | UIView.animate(withDuration: 0.05, delay: 0, options: .transitionCrossDissolve, animations: {
118 | self.containerView.alpha = 0
119 | }, completion: { (success:Bool) in
120 | self.containerView.removeGestureRecognizer(UIGestureRecognizer(target: self, action: #selector(SCPopDatePicker.dismiss(_:))))
121 | self.containerView.removeFromSuperview()
122 | self.removeFromSuperview()
123 | })
124 |
125 | })
126 |
127 |
128 | }
129 |
130 | //Show Blur Effect
131 | fileprivate func _showBlur() {
132 |
133 | let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.dark)
134 | let blurEffectView = UIVisualEffectView(effect: blurEffect)
135 | blurEffectView.frame = self.contentView.bounds
136 | blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] // for supporting device rotation
137 | self.containerView.addSubview(blurEffectView)
138 |
139 | }
140 |
141 | //Create DatePicker
142 | fileprivate func createDatePicker() -> UIDatePicker {
143 | let datePickerView: UIDatePicker = UIDatePicker(frame: CGRect(x: 0, y: -60, width: self.backgroundView.bounds.width, height: self.backgroundView.bounds.height))
144 | datePickerView.date = self.datePickerStartDate
145 | datePickerView.autoresizingMask = [.flexibleWidth]
146 | datePickerView.clipsToBounds = true
147 | datePickerView.backgroundColor = UIColor.white
148 | datePickerView.datePickerMode = self.datePickerType.dateType()
149 | return datePickerView
150 | }
151 | //
152 | //Create Background Container View
153 | fileprivate func createBackgroundView() -> UIView {
154 | let bgView = UIView(frame: CGRect(x: self.containerView.frame.width / 2 - 150, y: self.containerView.bounds.maxY + 100, width: 300, height: 160))
155 | bgView.autoresizingMask = [.flexibleWidth]
156 | bgView.backgroundColor = UIColor.clear
157 |
158 | if showShadow {
159 | bgView.layer.shadowOffset = CGSize(width: 3, height: 3)
160 | bgView.layer.shadowOpacity = 0.7
161 | bgView.layer.shadowRadius = 2
162 | }
163 | if showCornerRadius {
164 | bgView.layer.cornerRadius = 10.0
165 | }
166 | return bgView
167 | }
168 |
169 | fileprivate func addSelectButton() -> UIButton {
170 |
171 | let btn = UIButton(type: .system)
172 | btn.frame = CGRect(x: self.backgroundView.frame.width / 2 - 150, y: self.datePickerView.frame.maxY, width: self.backgroundView.frame.size.width, height: 48)
173 | btn.setTitle("Select", for: UIControlState())
174 | btn.titleLabel?.font = UIFont.systemFont(ofSize: 20)
175 | btn.tintColor = self.btnFontColour
176 | btn.backgroundColor = self.btnColour
177 | btn.addTarget(self, action: #selector(SCPopDatePicker.didSelectDate(_:)), for: .touchUpInside)
178 |
179 | //Round .Left / .Right Corners of DatePicker View
180 | if showCornerRadius {
181 | let path = UIBezierPath(roundedRect: btn.bounds, byRoundingCorners:[.bottomRight, .bottomLeft], cornerRadii: CGSize(width: 10, height: 10))
182 | let maskLayer = CAShapeLayer()
183 |
184 | maskLayer.path = path.cgPath
185 | btn.layer.mask = maskLayer
186 | }
187 |
188 |
189 | return btn
190 | }
191 |
192 | @objc fileprivate func didSelectDate(_ sender: UIButton) {
193 | if delegate != nil {
194 | self.delegate?.scPopDatePickerDidSelectDate(self.datePickerView.date)
195 | self.dismiss()
196 | }
197 | }
198 |
199 |
200 |
201 | required public init?(coder aDecoder: NSCoder) {
202 | fatalError("init(coder:) has not been implemented")
203 | }
204 |
205 |
206 | }
207 |
208 |
--------------------------------------------------------------------------------
/SCPopDatePicker.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | A2405B6B1D86CF8E00868D10 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2405B6A1D86CF8E00868D10 /* AppDelegate.swift */; };
11 | A2405B6D1D86CF8E00868D10 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2405B6C1D86CF8E00868D10 /* ViewController.swift */; };
12 | A2405B701D86CF8E00868D10 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A2405B6E1D86CF8E00868D10 /* Main.storyboard */; };
13 | A2405B721D86CF8E00868D10 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2405B711D86CF8E00868D10 /* Assets.xcassets */; };
14 | A2405B751D86CF8E00868D10 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A2405B731D86CF8E00868D10 /* LaunchScreen.storyboard */; };
15 | A2405B801D86CF8F00868D10 /* SCPopDatePickerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2405B7F1D86CF8F00868D10 /* SCPopDatePickerTests.swift */; };
16 | A2405B8B1D86CF8F00868D10 /* SCPopDatePickerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2405B8A1D86CF8F00868D10 /* SCPopDatePickerUITests.swift */; };
17 | A2405B9A1D86CFAE00868D10 /* SCPopDatePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2405B991D86CFAE00868D10 /* SCPopDatePicker.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | A2405B7C1D86CF8F00868D10 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = A2405B5F1D86CF8E00868D10 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = A2405B661D86CF8E00868D10;
26 | remoteInfo = SCPopDatePicker;
27 | };
28 | A2405B871D86CF8F00868D10 /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = A2405B5F1D86CF8E00868D10 /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = A2405B661D86CF8E00868D10;
33 | remoteInfo = SCPopDatePicker;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | A2405B671D86CF8E00868D10 /* SCPopDatePicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SCPopDatePicker.app; sourceTree = BUILT_PRODUCTS_DIR; };
39 | A2405B6A1D86CF8E00868D10 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
40 | A2405B6C1D86CF8E00868D10 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
41 | A2405B6F1D86CF8E00868D10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | A2405B711D86CF8E00868D10 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | A2405B741D86CF8E00868D10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | A2405B761D86CF8E00868D10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | A2405B7B1D86CF8F00868D10 /* SCPopDatePickerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCPopDatePickerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
46 | A2405B7F1D86CF8F00868D10 /* SCPopDatePickerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SCPopDatePickerTests.swift; sourceTree = ""; };
47 | A2405B811D86CF8F00868D10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
48 | A2405B861D86CF8F00868D10 /* SCPopDatePickerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SCPopDatePickerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49 | A2405B8A1D86CF8F00868D10 /* SCPopDatePickerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SCPopDatePickerUITests.swift; sourceTree = ""; };
50 | A2405B8C1D86CF8F00868D10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
51 | A2405B991D86CFAE00868D10 /* SCPopDatePicker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SCPopDatePicker.swift; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | A2405B641D86CF8E00868D10 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | A2405B781D86CF8F00868D10 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | A2405B831D86CF8F00868D10 /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | A2405B5E1D86CF8E00868D10 = {
80 | isa = PBXGroup;
81 | children = (
82 | A2405B691D86CF8E00868D10 /* SCPopDatePicker */,
83 | A2405B7E1D86CF8F00868D10 /* SCPopDatePickerTests */,
84 | A2405B891D86CF8F00868D10 /* SCPopDatePickerUITests */,
85 | A2405B681D86CF8E00868D10 /* Products */,
86 | );
87 | sourceTree = "";
88 | };
89 | A2405B681D86CF8E00868D10 /* Products */ = {
90 | isa = PBXGroup;
91 | children = (
92 | A2405B671D86CF8E00868D10 /* SCPopDatePicker.app */,
93 | A2405B7B1D86CF8F00868D10 /* SCPopDatePickerTests.xctest */,
94 | A2405B861D86CF8F00868D10 /* SCPopDatePickerUITests.xctest */,
95 | );
96 | name = Products;
97 | sourceTree = "";
98 | };
99 | A2405B691D86CF8E00868D10 /* SCPopDatePicker */ = {
100 | isa = PBXGroup;
101 | children = (
102 | A2405B981D86CF9400868D10 /* Source */,
103 | A2405B6A1D86CF8E00868D10 /* AppDelegate.swift */,
104 | A2405B6C1D86CF8E00868D10 /* ViewController.swift */,
105 | A2405B6E1D86CF8E00868D10 /* Main.storyboard */,
106 | A2405B711D86CF8E00868D10 /* Assets.xcassets */,
107 | A2405B731D86CF8E00868D10 /* LaunchScreen.storyboard */,
108 | A2405B761D86CF8E00868D10 /* Info.plist */,
109 | );
110 | path = SCPopDatePicker;
111 | sourceTree = "";
112 | };
113 | A2405B7E1D86CF8F00868D10 /* SCPopDatePickerTests */ = {
114 | isa = PBXGroup;
115 | children = (
116 | A2405B7F1D86CF8F00868D10 /* SCPopDatePickerTests.swift */,
117 | A2405B811D86CF8F00868D10 /* Info.plist */,
118 | );
119 | path = SCPopDatePickerTests;
120 | sourceTree = "";
121 | };
122 | A2405B891D86CF8F00868D10 /* SCPopDatePickerUITests */ = {
123 | isa = PBXGroup;
124 | children = (
125 | A2405B8A1D86CF8F00868D10 /* SCPopDatePickerUITests.swift */,
126 | A2405B8C1D86CF8F00868D10 /* Info.plist */,
127 | );
128 | path = SCPopDatePickerUITests;
129 | sourceTree = "";
130 | };
131 | A2405B981D86CF9400868D10 /* Source */ = {
132 | isa = PBXGroup;
133 | children = (
134 | A2405B991D86CFAE00868D10 /* SCPopDatePicker.swift */,
135 | );
136 | name = Source;
137 | sourceTree = "";
138 | };
139 | /* End PBXGroup section */
140 |
141 | /* Begin PBXNativeTarget section */
142 | A2405B661D86CF8E00868D10 /* SCPopDatePicker */ = {
143 | isa = PBXNativeTarget;
144 | buildConfigurationList = A2405B8F1D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePicker" */;
145 | buildPhases = (
146 | A2405B631D86CF8E00868D10 /* Sources */,
147 | A2405B641D86CF8E00868D10 /* Frameworks */,
148 | A2405B651D86CF8E00868D10 /* Resources */,
149 | );
150 | buildRules = (
151 | );
152 | dependencies = (
153 | );
154 | name = SCPopDatePicker;
155 | productName = SCPopDatePicker;
156 | productReference = A2405B671D86CF8E00868D10 /* SCPopDatePicker.app */;
157 | productType = "com.apple.product-type.application";
158 | };
159 | A2405B7A1D86CF8F00868D10 /* SCPopDatePickerTests */ = {
160 | isa = PBXNativeTarget;
161 | buildConfigurationList = A2405B921D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePickerTests" */;
162 | buildPhases = (
163 | A2405B771D86CF8F00868D10 /* Sources */,
164 | A2405B781D86CF8F00868D10 /* Frameworks */,
165 | A2405B791D86CF8F00868D10 /* Resources */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | A2405B7D1D86CF8F00868D10 /* PBXTargetDependency */,
171 | );
172 | name = SCPopDatePickerTests;
173 | productName = SCPopDatePickerTests;
174 | productReference = A2405B7B1D86CF8F00868D10 /* SCPopDatePickerTests.xctest */;
175 | productType = "com.apple.product-type.bundle.unit-test";
176 | };
177 | A2405B851D86CF8F00868D10 /* SCPopDatePickerUITests */ = {
178 | isa = PBXNativeTarget;
179 | buildConfigurationList = A2405B951D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePickerUITests" */;
180 | buildPhases = (
181 | A2405B821D86CF8F00868D10 /* Sources */,
182 | A2405B831D86CF8F00868D10 /* Frameworks */,
183 | A2405B841D86CF8F00868D10 /* Resources */,
184 | );
185 | buildRules = (
186 | );
187 | dependencies = (
188 | A2405B881D86CF8F00868D10 /* PBXTargetDependency */,
189 | );
190 | name = SCPopDatePickerUITests;
191 | productName = SCPopDatePickerUITests;
192 | productReference = A2405B861D86CF8F00868D10 /* SCPopDatePickerUITests.xctest */;
193 | productType = "com.apple.product-type.bundle.ui-testing";
194 | };
195 | /* End PBXNativeTarget section */
196 |
197 | /* Begin PBXProject section */
198 | A2405B5F1D86CF8E00868D10 /* Project object */ = {
199 | isa = PBXProject;
200 | attributes = {
201 | LastSwiftUpdateCheck = 0730;
202 | LastUpgradeCheck = 0800;
203 | ORGANIZATIONNAME = "Stewart Crainie";
204 | TargetAttributes = {
205 | A2405B661D86CF8E00868D10 = {
206 | CreatedOnToolsVersion = 7.3.1;
207 | DevelopmentTeam = V47445BV93;
208 | LastSwiftMigration = 0800;
209 | };
210 | A2405B7A1D86CF8F00868D10 = {
211 | CreatedOnToolsVersion = 7.3.1;
212 | DevelopmentTeam = V47445BV93;
213 | LastSwiftMigration = 0800;
214 | TestTargetID = A2405B661D86CF8E00868D10;
215 | };
216 | A2405B851D86CF8F00868D10 = {
217 | CreatedOnToolsVersion = 7.3.1;
218 | DevelopmentTeam = V47445BV93;
219 | LastSwiftMigration = 0800;
220 | TestTargetID = A2405B661D86CF8E00868D10;
221 | };
222 | };
223 | };
224 | buildConfigurationList = A2405B621D86CF8E00868D10 /* Build configuration list for PBXProject "SCPopDatePicker" */;
225 | compatibilityVersion = "Xcode 3.2";
226 | developmentRegion = English;
227 | hasScannedForEncodings = 0;
228 | knownRegions = (
229 | en,
230 | Base,
231 | );
232 | mainGroup = A2405B5E1D86CF8E00868D10;
233 | productRefGroup = A2405B681D86CF8E00868D10 /* Products */;
234 | projectDirPath = "";
235 | projectRoot = "";
236 | targets = (
237 | A2405B661D86CF8E00868D10 /* SCPopDatePicker */,
238 | A2405B7A1D86CF8F00868D10 /* SCPopDatePickerTests */,
239 | A2405B851D86CF8F00868D10 /* SCPopDatePickerUITests */,
240 | );
241 | };
242 | /* End PBXProject section */
243 |
244 | /* Begin PBXResourcesBuildPhase section */
245 | A2405B651D86CF8E00868D10 /* Resources */ = {
246 | isa = PBXResourcesBuildPhase;
247 | buildActionMask = 2147483647;
248 | files = (
249 | A2405B751D86CF8E00868D10 /* LaunchScreen.storyboard in Resources */,
250 | A2405B721D86CF8E00868D10 /* Assets.xcassets in Resources */,
251 | A2405B701D86CF8E00868D10 /* Main.storyboard in Resources */,
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | A2405B791D86CF8F00868D10 /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | A2405B841D86CF8F00868D10 /* Resources */ = {
263 | isa = PBXResourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | );
267 | runOnlyForDeploymentPostprocessing = 0;
268 | };
269 | /* End PBXResourcesBuildPhase section */
270 |
271 | /* Begin PBXSourcesBuildPhase section */
272 | A2405B631D86CF8E00868D10 /* Sources */ = {
273 | isa = PBXSourcesBuildPhase;
274 | buildActionMask = 2147483647;
275 | files = (
276 | A2405B6D1D86CF8E00868D10 /* ViewController.swift in Sources */,
277 | A2405B6B1D86CF8E00868D10 /* AppDelegate.swift in Sources */,
278 | A2405B9A1D86CFAE00868D10 /* SCPopDatePicker.swift in Sources */,
279 | );
280 | runOnlyForDeploymentPostprocessing = 0;
281 | };
282 | A2405B771D86CF8F00868D10 /* Sources */ = {
283 | isa = PBXSourcesBuildPhase;
284 | buildActionMask = 2147483647;
285 | files = (
286 | A2405B801D86CF8F00868D10 /* SCPopDatePickerTests.swift in Sources */,
287 | );
288 | runOnlyForDeploymentPostprocessing = 0;
289 | };
290 | A2405B821D86CF8F00868D10 /* Sources */ = {
291 | isa = PBXSourcesBuildPhase;
292 | buildActionMask = 2147483647;
293 | files = (
294 | A2405B8B1D86CF8F00868D10 /* SCPopDatePickerUITests.swift in Sources */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | /* End PBXSourcesBuildPhase section */
299 |
300 | /* Begin PBXTargetDependency section */
301 | A2405B7D1D86CF8F00868D10 /* PBXTargetDependency */ = {
302 | isa = PBXTargetDependency;
303 | target = A2405B661D86CF8E00868D10 /* SCPopDatePicker */;
304 | targetProxy = A2405B7C1D86CF8F00868D10 /* PBXContainerItemProxy */;
305 | };
306 | A2405B881D86CF8F00868D10 /* PBXTargetDependency */ = {
307 | isa = PBXTargetDependency;
308 | target = A2405B661D86CF8E00868D10 /* SCPopDatePicker */;
309 | targetProxy = A2405B871D86CF8F00868D10 /* PBXContainerItemProxy */;
310 | };
311 | /* End PBXTargetDependency section */
312 |
313 | /* Begin PBXVariantGroup section */
314 | A2405B6E1D86CF8E00868D10 /* Main.storyboard */ = {
315 | isa = PBXVariantGroup;
316 | children = (
317 | A2405B6F1D86CF8E00868D10 /* Base */,
318 | );
319 | name = Main.storyboard;
320 | sourceTree = "";
321 | };
322 | A2405B731D86CF8E00868D10 /* LaunchScreen.storyboard */ = {
323 | isa = PBXVariantGroup;
324 | children = (
325 | A2405B741D86CF8E00868D10 /* Base */,
326 | );
327 | name = LaunchScreen.storyboard;
328 | sourceTree = "";
329 | };
330 | /* End PBXVariantGroup section */
331 |
332 | /* Begin XCBuildConfiguration section */
333 | A2405B8D1D86CF8F00868D10 /* Debug */ = {
334 | isa = XCBuildConfiguration;
335 | buildSettings = {
336 | ALWAYS_SEARCH_USER_PATHS = NO;
337 | CLANG_ANALYZER_NONNULL = YES;
338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
339 | CLANG_CXX_LIBRARY = "libc++";
340 | CLANG_ENABLE_MODULES = YES;
341 | CLANG_ENABLE_OBJC_ARC = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_CONSTANT_CONVERSION = YES;
344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
345 | CLANG_WARN_EMPTY_BODY = YES;
346 | CLANG_WARN_ENUM_CONVERSION = YES;
347 | CLANG_WARN_INFINITE_RECURSION = YES;
348 | CLANG_WARN_INT_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
351 | CLANG_WARN_UNREACHABLE_CODE = YES;
352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
353 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
354 | COPY_PHASE_STRIP = NO;
355 | DEBUG_INFORMATION_FORMAT = dwarf;
356 | ENABLE_STRICT_OBJC_MSGSEND = YES;
357 | ENABLE_TESTABILITY = YES;
358 | GCC_C_LANGUAGE_STANDARD = gnu99;
359 | GCC_DYNAMIC_NO_PIC = NO;
360 | GCC_NO_COMMON_BLOCKS = YES;
361 | GCC_OPTIMIZATION_LEVEL = 0;
362 | GCC_PREPROCESSOR_DEFINITIONS = (
363 | "DEBUG=1",
364 | "$(inherited)",
365 | );
366 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
368 | GCC_WARN_UNDECLARED_SELECTOR = YES;
369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
370 | GCC_WARN_UNUSED_FUNCTION = YES;
371 | GCC_WARN_UNUSED_VARIABLE = YES;
372 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
373 | MTL_ENABLE_DEBUG_INFO = YES;
374 | ONLY_ACTIVE_ARCH = YES;
375 | SDKROOT = iphoneos;
376 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
377 | };
378 | name = Debug;
379 | };
380 | A2405B8E1D86CF8F00868D10 /* Release */ = {
381 | isa = XCBuildConfiguration;
382 | buildSettings = {
383 | ALWAYS_SEARCH_USER_PATHS = NO;
384 | CLANG_ANALYZER_NONNULL = YES;
385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
386 | CLANG_CXX_LIBRARY = "libc++";
387 | CLANG_ENABLE_MODULES = YES;
388 | CLANG_ENABLE_OBJC_ARC = YES;
389 | CLANG_WARN_BOOL_CONVERSION = YES;
390 | CLANG_WARN_CONSTANT_CONVERSION = YES;
391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
392 | CLANG_WARN_EMPTY_BODY = YES;
393 | CLANG_WARN_ENUM_CONVERSION = YES;
394 | CLANG_WARN_INFINITE_RECURSION = YES;
395 | CLANG_WARN_INT_CONVERSION = YES;
396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
397 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
398 | CLANG_WARN_UNREACHABLE_CODE = YES;
399 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
400 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
401 | COPY_PHASE_STRIP = NO;
402 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
403 | ENABLE_NS_ASSERTIONS = NO;
404 | ENABLE_STRICT_OBJC_MSGSEND = YES;
405 | GCC_C_LANGUAGE_STANDARD = gnu99;
406 | GCC_NO_COMMON_BLOCKS = YES;
407 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
408 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
409 | GCC_WARN_UNDECLARED_SELECTOR = YES;
410 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
411 | GCC_WARN_UNUSED_FUNCTION = YES;
412 | GCC_WARN_UNUSED_VARIABLE = YES;
413 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
414 | MTL_ENABLE_DEBUG_INFO = NO;
415 | SDKROOT = iphoneos;
416 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
417 | VALIDATE_PRODUCT = YES;
418 | };
419 | name = Release;
420 | };
421 | A2405B901D86CF8F00868D10 /* Debug */ = {
422 | isa = XCBuildConfiguration;
423 | buildSettings = {
424 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
425 | DEVELOPMENT_TEAM = V47445BV93;
426 | INFOPLIST_FILE = SCPopDatePicker/Info.plist;
427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
428 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePicker";
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | SWIFT_VERSION = 3.0;
431 | TARGETED_DEVICE_FAMILY = "1,2";
432 | };
433 | name = Debug;
434 | };
435 | A2405B911D86CF8F00868D10 /* Release */ = {
436 | isa = XCBuildConfiguration;
437 | buildSettings = {
438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
439 | DEVELOPMENT_TEAM = V47445BV93;
440 | INFOPLIST_FILE = SCPopDatePicker/Info.plist;
441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
442 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePicker";
443 | PRODUCT_NAME = "$(TARGET_NAME)";
444 | SWIFT_VERSION = 3.0;
445 | TARGETED_DEVICE_FAMILY = "1,2";
446 | };
447 | name = Release;
448 | };
449 | A2405B931D86CF8F00868D10 /* Debug */ = {
450 | isa = XCBuildConfiguration;
451 | buildSettings = {
452 | BUNDLE_LOADER = "$(TEST_HOST)";
453 | DEVELOPMENT_TEAM = V47445BV93;
454 | INFOPLIST_FILE = SCPopDatePickerTests/Info.plist;
455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
456 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePickerTests";
457 | PRODUCT_NAME = "$(TARGET_NAME)";
458 | SWIFT_VERSION = 3.0;
459 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SCPopDatePicker.app/SCPopDatePicker";
460 | };
461 | name = Debug;
462 | };
463 | A2405B941D86CF8F00868D10 /* Release */ = {
464 | isa = XCBuildConfiguration;
465 | buildSettings = {
466 | BUNDLE_LOADER = "$(TEST_HOST)";
467 | DEVELOPMENT_TEAM = V47445BV93;
468 | INFOPLIST_FILE = SCPopDatePickerTests/Info.plist;
469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
470 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePickerTests";
471 | PRODUCT_NAME = "$(TARGET_NAME)";
472 | SWIFT_VERSION = 3.0;
473 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SCPopDatePicker.app/SCPopDatePicker";
474 | };
475 | name = Release;
476 | };
477 | A2405B961D86CF8F00868D10 /* Debug */ = {
478 | isa = XCBuildConfiguration;
479 | buildSettings = {
480 | DEVELOPMENT_TEAM = V47445BV93;
481 | INFOPLIST_FILE = SCPopDatePickerUITests/Info.plist;
482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
483 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePickerUITests";
484 | PRODUCT_NAME = "$(TARGET_NAME)";
485 | SWIFT_VERSION = 3.0;
486 | TEST_TARGET_NAME = SCPopDatePicker;
487 | };
488 | name = Debug;
489 | };
490 | A2405B971D86CF8F00868D10 /* Release */ = {
491 | isa = XCBuildConfiguration;
492 | buildSettings = {
493 | DEVELOPMENT_TEAM = V47445BV93;
494 | INFOPLIST_FILE = SCPopDatePickerUITests/Info.plist;
495 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
496 | PRODUCT_BUNDLE_IDENTIFIER = "Stewart-Crainie.SCPopDatePickerUITests";
497 | PRODUCT_NAME = "$(TARGET_NAME)";
498 | SWIFT_VERSION = 3.0;
499 | TEST_TARGET_NAME = SCPopDatePicker;
500 | };
501 | name = Release;
502 | };
503 | /* End XCBuildConfiguration section */
504 |
505 | /* Begin XCConfigurationList section */
506 | A2405B621D86CF8E00868D10 /* Build configuration list for PBXProject "SCPopDatePicker" */ = {
507 | isa = XCConfigurationList;
508 | buildConfigurations = (
509 | A2405B8D1D86CF8F00868D10 /* Debug */,
510 | A2405B8E1D86CF8F00868D10 /* Release */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | A2405B8F1D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePicker" */ = {
516 | isa = XCConfigurationList;
517 | buildConfigurations = (
518 | A2405B901D86CF8F00868D10 /* Debug */,
519 | A2405B911D86CF8F00868D10 /* Release */,
520 | );
521 | defaultConfigurationIsVisible = 0;
522 | defaultConfigurationName = Release;
523 | };
524 | A2405B921D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePickerTests" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | A2405B931D86CF8F00868D10 /* Debug */,
528 | A2405B941D86CF8F00868D10 /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | defaultConfigurationName = Release;
532 | };
533 | A2405B951D86CF8F00868D10 /* Build configuration list for PBXNativeTarget "SCPopDatePickerUITests" */ = {
534 | isa = XCConfigurationList;
535 | buildConfigurations = (
536 | A2405B961D86CF8F00868D10 /* Debug */,
537 | A2405B971D86CF8F00868D10 /* Release */,
538 | );
539 | defaultConfigurationIsVisible = 0;
540 | defaultConfigurationName = Release;
541 | };
542 | /* End XCConfigurationList section */
543 | };
544 | rootObject = A2405B5F1D86CF8E00868D10 /* Project object */;
545 | }
546 |
--------------------------------------------------------------------------------