├── DNPaymentAlertSwift
├── DNPayAlertViewSwift.xcodeproj
│ ├── xcuserdata
│ │ └── dawnsmac.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── DCPaymentAlertSwift.xcscheme
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
├── DNPayAlertViewSwift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.swift
│ └── DNPayAlertView.swift
├── DNPayAlertViewSwiftTests
│ ├── Info.plist
│ └── DCPaymentAlertSwiftTests.swift
└── DNPayAlertViewSwiftUITests
│ ├── Info.plist
│ └── DCPaymentAlertSwiftUITests.swift
├── README.md
└── LICENSE
/DNPaymentAlertSwift/DNPayAlertViewSwift.xcodeproj/xcuserdata/dawnsmac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/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 | }
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwiftTests/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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwiftUITests/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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift.xcodeproj/xcuserdata/dawnsmac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DCPaymentAlertSwift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | F4340B001C91558E008E7C0D
16 |
17 | primary
18 |
19 |
20 | F4340B141C91558E008E7C0D
21 |
22 | primary
23 |
24 |
25 | F4340B1F1C91558E008E7C0D
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DCPayAlertView-Swift
2 | A payment alertview that imitating Wechat with six digital pay passwords.
3 |
4 | 一款模仿微信的6位数字支付密码弹框——Swift版
5 |
6 |
7 | ```
8 | 自己在练Swift的时候改写了一下.. 有问题多指教
9 | ```
10 |
11 | ### [同款OC版点击此处](https://github.com/dawnnnnn/DNPayAlertView)
12 |
13 |
14 | ## Preview 预览
15 |
16 | 
17 |
18 |
19 | ## Usage 使用
20 | support:iOS 9.2 and later
21 |
22 | ``` swift
23 | let payAlert = DNPayAlertView(frame: CGRectZero)
24 | payAlert.setTitle("请输入支付密码")
25 | payAlert.setDetail("提现")
26 | payAlert.setAmount(10)
27 | payAlert.completeBlock = ({(password: String) -> Void in
28 | print("password" + password)
29 | })
30 | payAlert.show()
31 | ```
32 |
33 | ## Update 更新
34 | 2017/01/25 : 更名为DNPayAlertViewSwift
35 |
36 | ## License
37 | MIT
38 |
39 | ## Contact
40 | tan32211@gmail.com
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Dawn Cai
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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwiftTests/DCPaymentAlertSwiftTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DNPayAlertViewSwiftTests.swift
3 | // DNPayAlertViewSwiftTests
4 | //
5 | // Created by dawnnnnn on 16/3/10.
6 | // Copyright © 2016年 dawnnnnn. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import DNPayAlertViewSwift
11 |
12 | class DNPayAlertViewSwiftTests: 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.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwiftUITests/DCPaymentAlertSwiftUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DNPayAlertViewSwiftUITests.swift
3 | // DNPayAlertViewSwiftUITests
4 | //
5 | // Created by dawnnnnn on 16/3/10.
6 | // Copyright © 2016年 dawnnnnn. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class DNPayAlertViewSwiftUITests: 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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | DNPayAlertViewSwift
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // DNPayAlertViewSwift
4 | //
5 | // Created by dawnnnnn on 16/3/10.
6 | // Copyright © 2016年 dawnnnnn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 |
12 | class ViewController: UIViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 | // Do any additional setup after loading the view, typically from a nib.
17 |
18 | self.view.backgroundColor = UIColor.lightGray
19 |
20 | // UIButton
21 | let button = UIButton(type: UIButtonType.system)
22 | button.frame = CGRect(x: 10, y: 300, width: 200, height: 50)
23 | button.backgroundColor = UIColor.green
24 | button.setTitle("button", for: UIControlState())
25 | button.setTitleColor(UIColor.darkGray, for: UIControlState())
26 | button.titleLabel?.font = UIFont.systemFont(ofSize: 18)
27 | button.addTarget(self, action: #selector(ViewController.buttonClicked(_:)), for: UIControlEvents.touchUpInside)
28 | self.view.addSubview(button)
29 | }
30 |
31 | override func didReceiveMemoryWarning() {
32 | super.didReceiveMemoryWarning()
33 | // Dispose of any resources that can be recreated.
34 | }
35 |
36 | func buttonClicked(_ sender: UIButton) {
37 |
38 | let payAlert = DNPayAlertView(frame: CGRect.zero)
39 | payAlert.setTitle("请输入支付密码")
40 | payAlert.setDetail("提现")
41 | payAlert.setAmount(10)
42 | payAlert.completeBlock = ({(password: String) -> Void in
43 | print("password" + password)
44 | })
45 | payAlert.show()
46 | }
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/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 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // DNPayAlertViewSwift
4 | //
5 | // Created by dawnnnnn on 16/3/10.
6 | // Copyright © 2016年 dawnnnnn. 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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift.xcodeproj/xcuserdata/dawnsmac.xcuserdatad/xcschemes/DCPaymentAlertSwift.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 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift/DNPayAlertView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DNPayAlertView.swift
3 | // DNPayAlertViewSwift
4 | //
5 | // Created by dawnnnnn on 16/3/10.
6 | // Copyright © 2016年 dawnnnnn. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | // FIXME: comparison operators with optionals were removed from the Swift Standard Libary.
11 | // Consider refactoring the code to use the non-optional operators.
12 | fileprivate func < (lhs: T?, rhs: T?) -> Bool {
13 | switch (lhs, rhs) {
14 | case let (l?, r?):
15 | return l < r
16 | case (nil, _?):
17 | return true
18 | default:
19 | return false
20 | }
21 | }
22 |
23 | // FIXME: comparison operators with optionals were removed from the Swift Standard Libary.
24 | // Consider refactoring the code to use the non-optional operators.
25 | fileprivate func >= (lhs: T?, rhs: T?) -> Bool {
26 | switch (lhs, rhs) {
27 | case let (l?, r?):
28 | return l >= r
29 | default:
30 | return !(lhs < rhs)
31 | }
32 | }
33 |
34 |
35 | typealias funcBlock = (String) -> Void
36 |
37 | class DNPayAlertView: UIView, UITextFieldDelegate {
38 |
39 | let titleHeight : CGFloat = 46.0
40 | let paymentWidth : CGFloat = UIScreen.main.bounds.size.width - 80.0
41 | let pwdCount = 6
42 | let dotWidth : CGFloat = 10.0
43 | let keyboardHeight : CGFloat = 216.0
44 | let keyViewDistance : CGFloat = 100.0
45 | let alertHeight : CGFloat = 200.0
46 |
47 | var completeBlock : (((String) -> Void)?)
48 |
49 |
50 | fileprivate var paymentAlert, inputWhiteView : UIView!
51 | fileprivate var closeBtn : UIButton!
52 | fileprivate var titleLabel, detailLabel, amountLabel : UILabel!
53 | fileprivate var pwdTextField : UITextField!
54 |
55 | fileprivate var pwdIndicatorArr = [UILabel]()
56 |
57 | override init(frame: CGRect) {
58 | super.init(frame: UIScreen.main.bounds)
59 | self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.3)
60 | _initSubviews()
61 | }
62 |
63 | required init?(coder aDecoder: NSCoder) {
64 | fatalError("init(coder:) has not been implemented")
65 | }
66 |
67 | func _initSubviews() {
68 | if (paymentAlert == nil) {
69 | paymentAlert = UIView(frame: CGRect(x: 40, y: UIScreen.main.bounds.size.height - keyViewDistance - keyboardHeight - alertHeight, width: paymentWidth, height: alertHeight))
70 | paymentAlert.layer.cornerRadius = 5.0
71 | paymentAlert.layer.masksToBounds = true
72 | paymentAlert.backgroundColor = UIColor(white: 1, alpha: 0.95)
73 | self.addSubview(paymentAlert)
74 |
75 | titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: paymentWidth, height: titleHeight))
76 | titleLabel.textAlignment = NSTextAlignment.center
77 | titleLabel.textColor = UIColor.darkGray
78 | titleLabel.font = UIFont.systemFont(ofSize: 17)
79 | titleLabel.text = "title"
80 | paymentAlert.addSubview(titleLabel)
81 |
82 | closeBtn = UIButton(type: UIButtonType.custom)
83 | closeBtn?.frame = CGRect(x: 0, y: 0, width: titleHeight, height: titleHeight)
84 | closeBtn?.setTitle("╳", for: UIControlState())
85 | closeBtn?.setTitleColor(UIColor.darkGray, for: UIControlState())
86 | closeBtn?.addTarget(self, action: #selector(DNPayAlertView.dismiss), for: UIControlEvents.touchUpInside)
87 | closeBtn?.titleLabel?.font = UIFont.systemFont(ofSize: 15)
88 | paymentAlert.addSubview(closeBtn)
89 |
90 | let line = UILabel(frame: CGRect(x: 0, y: titleHeight, width: paymentWidth, height: 0.5))
91 | line.backgroundColor = UIColor.lightGray
92 | paymentAlert.addSubview(line)
93 |
94 | detailLabel = UILabel(frame: CGRect(x: 15, y: titleHeight + 15, width: paymentWidth - 30, height: 20))
95 | detailLabel.textAlignment = NSTextAlignment.center
96 | detailLabel.textColor = UIColor.darkGray
97 | detailLabel.font = UIFont.systemFont(ofSize: 16)
98 | detailLabel.text = "detail"
99 | paymentAlert.addSubview(detailLabel)
100 |
101 | amountLabel = UILabel(frame: CGRect(x: 15, y: titleHeight * 2, width: paymentWidth - 30, height: 25))
102 | amountLabel.textAlignment = NSTextAlignment.center
103 | amountLabel.textColor = UIColor.darkGray
104 | amountLabel.font = UIFont.systemFont(ofSize: 33)
105 | amountLabel.text = "233"
106 | paymentAlert.addSubview(amountLabel)
107 |
108 | inputWhiteView = UIView(frame: CGRect(x: 15, y: paymentAlert.frame.size.height - (paymentWidth - 30) / 6 - 15, width: paymentWidth - 30, height: (paymentWidth - 30) / 6))
109 | inputWhiteView.backgroundColor = UIColor.white
110 | inputWhiteView.layer.borderColor = UIColor(red: 0.9, green: 0.9, blue: 0.9, alpha: 1).cgColor
111 | inputWhiteView.layer.borderWidth = 1.0
112 | paymentAlert.addSubview(inputWhiteView)
113 |
114 | pwdTextField = UITextField(frame: CGRect(x: 0, y: 0, width: self.frame.size.width, height: self.frame.size.height))
115 | pwdTextField.isHidden = true
116 | pwdTextField.delegate = self
117 | pwdTextField.keyboardType = UIKeyboardType.numberPad
118 | pwdTextField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .allEditingEvents)
119 | inputWhiteView.addSubview(pwdTextField)
120 |
121 |
122 | let width : CGFloat = inputWhiteView.bounds.size.width / CGFloat(pwdCount)
123 | for i in 0 ..< pwdCount {
124 | let dot = UILabel(frame: CGRect(x: (width - dotWidth) / 2.0 + CGFloat(i) * width, y: (inputWhiteView.bounds.size.height - dotWidth) / 2.0, width: dotWidth, height: dotWidth))
125 | dot.backgroundColor = UIColor.black
126 | dot.layer.cornerRadius = dotWidth / 2.0
127 | dot.clipsToBounds = true
128 | dot.isHidden = true
129 | inputWhiteView.addSubview(dot)
130 | pwdIndicatorArr.append(dot)
131 |
132 | if i == pwdCount - 1 {
133 | continue
134 | }
135 | let line = UILabel(frame: CGRect(x: CGFloat(i+1) * width, y: 0, width: 0.5, height: inputWhiteView.bounds.size.height))
136 | line.backgroundColor = UIColor(colorLiteralRed: 0.9, green: 0.9, blue: 0.9, alpha: 1)
137 | inputWhiteView.addSubview(line)
138 | }
139 |
140 | }
141 | }
142 |
143 | func show() {
144 | let keyWindow : UIWindow = UIApplication.shared.keyWindow!
145 | keyWindow.addSubview(self)
146 |
147 | paymentAlert?.transform = CGAffineTransform(scaleX: 1.21, y: 1.21)
148 | paymentAlert?.alpha = 0
149 |
150 | UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 1, options: UIViewAnimationOptions(), animations: ({
151 | self.pwdTextField.becomeFirstResponder()
152 | self.paymentAlert?.transform = CGAffineTransform(scaleX: 1, y: 1)
153 | self.paymentAlert?.alpha = 1
154 | }), completion: nil)
155 |
156 | }
157 |
158 | func dismiss() {
159 | pwdTextField.resignFirstResponder()
160 |
161 | UIView.animate(withDuration: 0.5, animations: ({
162 | self.paymentAlert.transform = CGAffineTransform(scaleX: 1.21, y: 1.21)
163 | self.paymentAlert.alpha = 0
164 | self.alpha = 0
165 | }), completion: { (finishd: Bool) -> Void in
166 | self.removeFromSuperview()
167 | })
168 |
169 | }
170 |
171 | func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
172 | if ((textField.text?.characters.count >= pwdCount) && (string.characters.count > 0)) {
173 | return false
174 | }
175 | let predicate = NSPredicate(format: "SELF MATCHES %@","^[0-9]*$")
176 | if !predicate.evaluate(with: string) {
177 | return false
178 | }
179 |
180 | var totalString : String
181 | if string.characters.count <= 0 {
182 | let index = textField.text?.characters.index((textField.text?.endIndex)!, offsetBy: -1)
183 | totalString = textField.text!.substring(to: index!)
184 | }
185 | else {
186 | totalString = textField.text! + string
187 | }
188 |
189 | self.setDotWithCount(totalString.characters.count)
190 | print("total______" + totalString)
191 |
192 | if totalString.characters.count == 6 {
193 | print("complete")
194 | completeBlock?(totalString)
195 | self.dismiss()
196 | }
197 |
198 | return true
199 | }
200 |
201 | func textFieldDidChange(_ textField: UITextField) {
202 | // TODO:
203 | /*原本想用此方法调用,奈何结束时调用了两次,不知为何..待解决*/
204 | // print("total______" + textField.text!)
205 | // self.setDotWithCount((textField.text?.characters.count)!)
206 | // if (textField.text?.characters.count)! == pwdCount {
207 | // completeBlock?(textField.text!)
208 | // self.dismiss()
209 | // }
210 | }
211 |
212 | func setDotWithCount(_ count : NSInteger) {
213 | for dot in pwdIndicatorArr {
214 | dot.isHidden = true
215 | }
216 |
217 | for i in 0 ..< count {
218 | pwdIndicatorArr[i].isHidden = false
219 | }
220 | }
221 |
222 | func setTitle(_ title : String) {
223 | titleLabel.text = title
224 | }
225 |
226 | func setDetail(_ detail : String) {
227 | detailLabel.text = detail
228 | }
229 |
230 | func setAmount(_ amount : CGFloat) {
231 | amountLabel.text = "\(amount)"
232 | }
233 |
234 |
235 | }
236 |
--------------------------------------------------------------------------------
/DNPaymentAlertSwift/DNPayAlertViewSwift.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | F4340B051C91558E008E7C0D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4340B041C91558E008E7C0D /* AppDelegate.swift */; };
11 | F4340B071C91558E008E7C0D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4340B061C91558E008E7C0D /* ViewController.swift */; };
12 | F4340B0A1C91558E008E7C0D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4340B081C91558E008E7C0D /* Main.storyboard */; };
13 | F4340B0C1C91558E008E7C0D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4340B0B1C91558E008E7C0D /* Assets.xcassets */; };
14 | F4340B0F1C91558E008E7C0D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4340B0D1C91558E008E7C0D /* LaunchScreen.storyboard */; };
15 | F4340B1A1C91558E008E7C0D /* DCPaymentAlertSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4340B191C91558E008E7C0D /* DCPaymentAlertSwiftTests.swift */; };
16 | F4340B251C91558E008E7C0D /* DCPaymentAlertSwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4340B241C91558E008E7C0D /* DCPaymentAlertSwiftUITests.swift */; };
17 | F4340B331C91561A008E7C0D /* DNPayAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4340B321C91561A008E7C0D /* DNPayAlertView.swift */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | F4340B161C91558E008E7C0D /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = F4340AF91C91558E008E7C0D /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = F4340B001C91558E008E7C0D;
26 | remoteInfo = DCPaymentAlertSwift;
27 | };
28 | F4340B211C91558E008E7C0D /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = F4340AF91C91558E008E7C0D /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = F4340B001C91558E008E7C0D;
33 | remoteInfo = DCPaymentAlertSwift;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | F4340B011C91558E008E7C0D /* DNPayAlertViewSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DNPayAlertViewSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
39 | F4340B041C91558E008E7C0D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
40 | F4340B061C91558E008E7C0D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
41 | F4340B091C91558E008E7C0D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | F4340B0B1C91558E008E7C0D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | F4340B0E1C91558E008E7C0D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | F4340B101C91558E008E7C0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | F4340B151C91558E008E7C0D /* DNPayAlertViewSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DNPayAlertViewSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
46 | F4340B191C91558E008E7C0D /* DCPaymentAlertSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DCPaymentAlertSwiftTests.swift; sourceTree = ""; };
47 | F4340B1B1C91558E008E7C0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
48 | F4340B201C91558E008E7C0D /* DNPayAlertViewSwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DNPayAlertViewSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49 | F4340B241C91558E008E7C0D /* DCPaymentAlertSwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DCPaymentAlertSwiftUITests.swift; sourceTree = ""; };
50 | F4340B261C91558E008E7C0D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
51 | F4340B321C91561A008E7C0D /* DNPayAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DNPayAlertView.swift; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | F4340AFE1C91558E008E7C0D /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | F4340B121C91558E008E7C0D /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | F4340B1D1C91558E008E7C0D /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | F4340AF81C91558E008E7C0D = {
80 | isa = PBXGroup;
81 | children = (
82 | F4340B031C91558E008E7C0D /* DNPayAlertViewSwift */,
83 | F4340B181C91558E008E7C0D /* DCPaymentAlertSwiftTests */,
84 | F4340B231C91558E008E7C0D /* DCPaymentAlertSwiftUITests */,
85 | F4340B021C91558E008E7C0D /* Products */,
86 | );
87 | sourceTree = "";
88 | };
89 | F4340B021C91558E008E7C0D /* Products */ = {
90 | isa = PBXGroup;
91 | children = (
92 | F4340B011C91558E008E7C0D /* DNPayAlertViewSwift.app */,
93 | F4340B151C91558E008E7C0D /* DNPayAlertViewSwiftTests.xctest */,
94 | F4340B201C91558E008E7C0D /* DNPayAlertViewSwiftUITests.xctest */,
95 | );
96 | name = Products;
97 | sourceTree = "";
98 | };
99 | F4340B031C91558E008E7C0D /* DNPayAlertViewSwift */ = {
100 | isa = PBXGroup;
101 | children = (
102 | F4340B321C91561A008E7C0D /* DNPayAlertView.swift */,
103 | F4340B041C91558E008E7C0D /* AppDelegate.swift */,
104 | F4340B061C91558E008E7C0D /* ViewController.swift */,
105 | F4340B081C91558E008E7C0D /* Main.storyboard */,
106 | F4340B0B1C91558E008E7C0D /* Assets.xcassets */,
107 | F4340B0D1C91558E008E7C0D /* LaunchScreen.storyboard */,
108 | F4340B101C91558E008E7C0D /* Info.plist */,
109 | );
110 | path = DNPayAlertViewSwift;
111 | sourceTree = "";
112 | };
113 | F4340B181C91558E008E7C0D /* DCPaymentAlertSwiftTests */ = {
114 | isa = PBXGroup;
115 | children = (
116 | F4340B191C91558E008E7C0D /* DCPaymentAlertSwiftTests.swift */,
117 | F4340B1B1C91558E008E7C0D /* Info.plist */,
118 | );
119 | name = DCPaymentAlertSwiftTests;
120 | path = DNPayAlertViewSwiftTests;
121 | sourceTree = "";
122 | };
123 | F4340B231C91558E008E7C0D /* DCPaymentAlertSwiftUITests */ = {
124 | isa = PBXGroup;
125 | children = (
126 | F4340B241C91558E008E7C0D /* DCPaymentAlertSwiftUITests.swift */,
127 | F4340B261C91558E008E7C0D /* Info.plist */,
128 | );
129 | name = DCPaymentAlertSwiftUITests;
130 | path = DNPayAlertViewSwiftUITests;
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXNativeTarget section */
136 | F4340B001C91558E008E7C0D /* DNPayAlertViewSwift */ = {
137 | isa = PBXNativeTarget;
138 | buildConfigurationList = F4340B291C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwift" */;
139 | buildPhases = (
140 | F4340AFD1C91558E008E7C0D /* Sources */,
141 | F4340AFE1C91558E008E7C0D /* Frameworks */,
142 | F4340AFF1C91558E008E7C0D /* Resources */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = DNPayAlertViewSwift;
149 | productName = DCPaymentAlertSwift;
150 | productReference = F4340B011C91558E008E7C0D /* DNPayAlertViewSwift.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | F4340B141C91558E008E7C0D /* DNPayAlertViewSwiftTests */ = {
154 | isa = PBXNativeTarget;
155 | buildConfigurationList = F4340B2C1C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwiftTests" */;
156 | buildPhases = (
157 | F4340B111C91558E008E7C0D /* Sources */,
158 | F4340B121C91558E008E7C0D /* Frameworks */,
159 | F4340B131C91558E008E7C0D /* Resources */,
160 | );
161 | buildRules = (
162 | );
163 | dependencies = (
164 | F4340B171C91558E008E7C0D /* PBXTargetDependency */,
165 | );
166 | name = DNPayAlertViewSwiftTests;
167 | productName = DCPaymentAlertSwiftTests;
168 | productReference = F4340B151C91558E008E7C0D /* DNPayAlertViewSwiftTests.xctest */;
169 | productType = "com.apple.product-type.bundle.unit-test";
170 | };
171 | F4340B1F1C91558E008E7C0D /* DNPayAlertViewSwiftUITests */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = F4340B2F1C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwiftUITests" */;
174 | buildPhases = (
175 | F4340B1C1C91558E008E7C0D /* Sources */,
176 | F4340B1D1C91558E008E7C0D /* Frameworks */,
177 | F4340B1E1C91558E008E7C0D /* Resources */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | F4340B221C91558E008E7C0D /* PBXTargetDependency */,
183 | );
184 | name = DNPayAlertViewSwiftUITests;
185 | productName = DCPaymentAlertSwiftUITests;
186 | productReference = F4340B201C91558E008E7C0D /* DNPayAlertViewSwiftUITests.xctest */;
187 | productType = "com.apple.product-type.bundle.ui-testing";
188 | };
189 | /* End PBXNativeTarget section */
190 |
191 | /* Begin PBXProject section */
192 | F4340AF91C91558E008E7C0D /* Project object */ = {
193 | isa = PBXProject;
194 | attributes = {
195 | LastSwiftUpdateCheck = 0720;
196 | LastUpgradeCheck = 0720;
197 | ORGANIZATIONNAME = dawnnnnn;
198 | TargetAttributes = {
199 | F4340B001C91558E008E7C0D = {
200 | CreatedOnToolsVersion = 7.2.1;
201 | LastSwiftMigration = 0820;
202 | };
203 | F4340B141C91558E008E7C0D = {
204 | CreatedOnToolsVersion = 7.2.1;
205 | LastSwiftMigration = 0820;
206 | TestTargetID = F4340B001C91558E008E7C0D;
207 | };
208 | F4340B1F1C91558E008E7C0D = {
209 | CreatedOnToolsVersion = 7.2.1;
210 | LastSwiftMigration = 0820;
211 | TestTargetID = F4340B001C91558E008E7C0D;
212 | };
213 | };
214 | };
215 | buildConfigurationList = F4340AFC1C91558E008E7C0D /* Build configuration list for PBXProject "DNPayAlertViewSwift" */;
216 | compatibilityVersion = "Xcode 3.2";
217 | developmentRegion = English;
218 | hasScannedForEncodings = 0;
219 | knownRegions = (
220 | en,
221 | Base,
222 | );
223 | mainGroup = F4340AF81C91558E008E7C0D;
224 | productRefGroup = F4340B021C91558E008E7C0D /* Products */;
225 | projectDirPath = "";
226 | projectRoot = "";
227 | targets = (
228 | F4340B001C91558E008E7C0D /* DNPayAlertViewSwift */,
229 | F4340B141C91558E008E7C0D /* DNPayAlertViewSwiftTests */,
230 | F4340B1F1C91558E008E7C0D /* DNPayAlertViewSwiftUITests */,
231 | );
232 | };
233 | /* End PBXProject section */
234 |
235 | /* Begin PBXResourcesBuildPhase section */
236 | F4340AFF1C91558E008E7C0D /* Resources */ = {
237 | isa = PBXResourcesBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | F4340B0F1C91558E008E7C0D /* LaunchScreen.storyboard in Resources */,
241 | F4340B0C1C91558E008E7C0D /* Assets.xcassets in Resources */,
242 | F4340B0A1C91558E008E7C0D /* Main.storyboard in Resources */,
243 | );
244 | runOnlyForDeploymentPostprocessing = 0;
245 | };
246 | F4340B131C91558E008E7C0D /* Resources */ = {
247 | isa = PBXResourcesBuildPhase;
248 | buildActionMask = 2147483647;
249 | files = (
250 | );
251 | runOnlyForDeploymentPostprocessing = 0;
252 | };
253 | F4340B1E1C91558E008E7C0D /* Resources */ = {
254 | isa = PBXResourcesBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | runOnlyForDeploymentPostprocessing = 0;
259 | };
260 | /* End PBXResourcesBuildPhase section */
261 |
262 | /* Begin PBXSourcesBuildPhase section */
263 | F4340AFD1C91558E008E7C0D /* Sources */ = {
264 | isa = PBXSourcesBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | F4340B071C91558E008E7C0D /* ViewController.swift in Sources */,
268 | F4340B051C91558E008E7C0D /* AppDelegate.swift in Sources */,
269 | F4340B331C91561A008E7C0D /* DNPayAlertView.swift in Sources */,
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | };
273 | F4340B111C91558E008E7C0D /* Sources */ = {
274 | isa = PBXSourcesBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | F4340B1A1C91558E008E7C0D /* DCPaymentAlertSwiftTests.swift in Sources */,
278 | );
279 | runOnlyForDeploymentPostprocessing = 0;
280 | };
281 | F4340B1C1C91558E008E7C0D /* Sources */ = {
282 | isa = PBXSourcesBuildPhase;
283 | buildActionMask = 2147483647;
284 | files = (
285 | F4340B251C91558E008E7C0D /* DCPaymentAlertSwiftUITests.swift in Sources */,
286 | );
287 | runOnlyForDeploymentPostprocessing = 0;
288 | };
289 | /* End PBXSourcesBuildPhase section */
290 |
291 | /* Begin PBXTargetDependency section */
292 | F4340B171C91558E008E7C0D /* PBXTargetDependency */ = {
293 | isa = PBXTargetDependency;
294 | target = F4340B001C91558E008E7C0D /* DNPayAlertViewSwift */;
295 | targetProxy = F4340B161C91558E008E7C0D /* PBXContainerItemProxy */;
296 | };
297 | F4340B221C91558E008E7C0D /* PBXTargetDependency */ = {
298 | isa = PBXTargetDependency;
299 | target = F4340B001C91558E008E7C0D /* DNPayAlertViewSwift */;
300 | targetProxy = F4340B211C91558E008E7C0D /* PBXContainerItemProxy */;
301 | };
302 | /* End PBXTargetDependency section */
303 |
304 | /* Begin PBXVariantGroup section */
305 | F4340B081C91558E008E7C0D /* Main.storyboard */ = {
306 | isa = PBXVariantGroup;
307 | children = (
308 | F4340B091C91558E008E7C0D /* Base */,
309 | );
310 | name = Main.storyboard;
311 | sourceTree = "";
312 | };
313 | F4340B0D1C91558E008E7C0D /* LaunchScreen.storyboard */ = {
314 | isa = PBXVariantGroup;
315 | children = (
316 | F4340B0E1C91558E008E7C0D /* Base */,
317 | );
318 | name = LaunchScreen.storyboard;
319 | sourceTree = "";
320 | };
321 | /* End PBXVariantGroup section */
322 |
323 | /* Begin XCBuildConfiguration section */
324 | F4340B271C91558E008E7C0D /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | ALWAYS_SEARCH_USER_PATHS = NO;
328 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
329 | CLANG_CXX_LIBRARY = "libc++";
330 | CLANG_ENABLE_MODULES = YES;
331 | CLANG_ENABLE_OBJC_ARC = YES;
332 | CLANG_WARN_BOOL_CONVERSION = YES;
333 | CLANG_WARN_CONSTANT_CONVERSION = YES;
334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335 | CLANG_WARN_EMPTY_BODY = YES;
336 | CLANG_WARN_ENUM_CONVERSION = YES;
337 | CLANG_WARN_INT_CONVERSION = YES;
338 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
339 | CLANG_WARN_UNREACHABLE_CODE = YES;
340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
342 | COPY_PHASE_STRIP = NO;
343 | DEBUG_INFORMATION_FORMAT = dwarf;
344 | ENABLE_STRICT_OBJC_MSGSEND = YES;
345 | ENABLE_TESTABILITY = YES;
346 | GCC_C_LANGUAGE_STANDARD = gnu99;
347 | GCC_DYNAMIC_NO_PIC = NO;
348 | GCC_NO_COMMON_BLOCKS = YES;
349 | GCC_OPTIMIZATION_LEVEL = 0;
350 | GCC_PREPROCESSOR_DEFINITIONS = (
351 | "DEBUG=1",
352 | "$(inherited)",
353 | );
354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
356 | GCC_WARN_UNDECLARED_SELECTOR = YES;
357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358 | GCC_WARN_UNUSED_FUNCTION = YES;
359 | GCC_WARN_UNUSED_VARIABLE = YES;
360 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
361 | MTL_ENABLE_DEBUG_INFO = YES;
362 | ONLY_ACTIVE_ARCH = YES;
363 | SDKROOT = iphoneos;
364 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
365 | };
366 | name = Debug;
367 | };
368 | F4340B281C91558E008E7C0D /* Release */ = {
369 | isa = XCBuildConfiguration;
370 | buildSettings = {
371 | ALWAYS_SEARCH_USER_PATHS = NO;
372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
373 | CLANG_CXX_LIBRARY = "libc++";
374 | CLANG_ENABLE_MODULES = YES;
375 | CLANG_ENABLE_OBJC_ARC = YES;
376 | CLANG_WARN_BOOL_CONVERSION = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
379 | CLANG_WARN_EMPTY_BODY = YES;
380 | CLANG_WARN_ENUM_CONVERSION = YES;
381 | CLANG_WARN_INT_CONVERSION = YES;
382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
383 | CLANG_WARN_UNREACHABLE_CODE = YES;
384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
386 | COPY_PHASE_STRIP = NO;
387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
388 | ENABLE_NS_ASSERTIONS = NO;
389 | ENABLE_STRICT_OBJC_MSGSEND = YES;
390 | GCC_C_LANGUAGE_STANDARD = gnu99;
391 | GCC_NO_COMMON_BLOCKS = YES;
392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
394 | GCC_WARN_UNDECLARED_SELECTOR = YES;
395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
396 | GCC_WARN_UNUSED_FUNCTION = YES;
397 | GCC_WARN_UNUSED_VARIABLE = YES;
398 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
399 | MTL_ENABLE_DEBUG_INFO = NO;
400 | SDKROOT = iphoneos;
401 | VALIDATE_PRODUCT = YES;
402 | };
403 | name = Release;
404 | };
405 | F4340B2A1C91558E008E7C0D /* Debug */ = {
406 | isa = XCBuildConfiguration;
407 | buildSettings = {
408 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
409 | INFOPLIST_FILE = DNPayAlertViewSwift/Info.plist;
410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
411 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwift;
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | SWIFT_VERSION = 3.0;
414 | };
415 | name = Debug;
416 | };
417 | F4340B2B1C91558E008E7C0D /* Release */ = {
418 | isa = XCBuildConfiguration;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | INFOPLIST_FILE = DNPayAlertViewSwift/Info.plist;
422 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
423 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwift;
424 | PRODUCT_NAME = "$(TARGET_NAME)";
425 | SWIFT_VERSION = 3.0;
426 | };
427 | name = Release;
428 | };
429 | F4340B2D1C91558E008E7C0D /* Debug */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | BUNDLE_LOADER = "$(TEST_HOST)";
433 | INFOPLIST_FILE = DNPayAlertViewSwiftTests/Info.plist;
434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
435 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwiftTests;
436 | PRODUCT_NAME = "$(TARGET_NAME)";
437 | SWIFT_VERSION = 3.0;
438 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DNPayAlertViewSwift.app/DNPayAlertViewSwift";
439 | };
440 | name = Debug;
441 | };
442 | F4340B2E1C91558E008E7C0D /* Release */ = {
443 | isa = XCBuildConfiguration;
444 | buildSettings = {
445 | BUNDLE_LOADER = "$(TEST_HOST)";
446 | INFOPLIST_FILE = DNPayAlertViewSwiftTests/Info.plist;
447 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
448 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwiftTests;
449 | PRODUCT_NAME = "$(TARGET_NAME)";
450 | SWIFT_VERSION = 3.0;
451 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DNPayAlertViewSwift.app/DNPayAlertViewSwift";
452 | };
453 | name = Release;
454 | };
455 | F4340B301C91558E008E7C0D /* Debug */ = {
456 | isa = XCBuildConfiguration;
457 | buildSettings = {
458 | INFOPLIST_FILE = DNPayAlertViewSwiftUITests/Info.plist;
459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
460 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwiftUITests;
461 | PRODUCT_NAME = "$(TARGET_NAME)";
462 | SWIFT_VERSION = 3.0;
463 | TEST_TARGET_NAME = DNPayAlertViewSwift;
464 | USES_XCTRUNNER = YES;
465 | };
466 | name = Debug;
467 | };
468 | F4340B311C91558E008E7C0D /* Release */ = {
469 | isa = XCBuildConfiguration;
470 | buildSettings = {
471 | INFOPLIST_FILE = DNPayAlertViewSwiftUITests/Info.plist;
472 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
473 | PRODUCT_BUNDLE_IDENTIFIER = com.redmist.DNPayAlertViewSwiftUITests;
474 | PRODUCT_NAME = "$(TARGET_NAME)";
475 | SWIFT_VERSION = 3.0;
476 | TEST_TARGET_NAME = DNPayAlertViewSwift;
477 | USES_XCTRUNNER = YES;
478 | };
479 | name = Release;
480 | };
481 | /* End XCBuildConfiguration section */
482 |
483 | /* Begin XCConfigurationList section */
484 | F4340AFC1C91558E008E7C0D /* Build configuration list for PBXProject "DNPayAlertViewSwift" */ = {
485 | isa = XCConfigurationList;
486 | buildConfigurations = (
487 | F4340B271C91558E008E7C0D /* Debug */,
488 | F4340B281C91558E008E7C0D /* Release */,
489 | );
490 | defaultConfigurationIsVisible = 0;
491 | defaultConfigurationName = Release;
492 | };
493 | F4340B291C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwift" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | F4340B2A1C91558E008E7C0D /* Debug */,
497 | F4340B2B1C91558E008E7C0D /* Release */,
498 | );
499 | defaultConfigurationIsVisible = 0;
500 | defaultConfigurationName = Release;
501 | };
502 | F4340B2C1C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwiftTests" */ = {
503 | isa = XCConfigurationList;
504 | buildConfigurations = (
505 | F4340B2D1C91558E008E7C0D /* Debug */,
506 | F4340B2E1C91558E008E7C0D /* Release */,
507 | );
508 | defaultConfigurationIsVisible = 0;
509 | defaultConfigurationName = Release;
510 | };
511 | F4340B2F1C91558E008E7C0D /* Build configuration list for PBXNativeTarget "DNPayAlertViewSwiftUITests" */ = {
512 | isa = XCConfigurationList;
513 | buildConfigurations = (
514 | F4340B301C91558E008E7C0D /* Debug */,
515 | F4340B311C91558E008E7C0D /* Release */,
516 | );
517 | defaultConfigurationIsVisible = 0;
518 | defaultConfigurationName = Release;
519 | };
520 | /* End XCConfigurationList section */
521 | };
522 | rootObject = F4340AF91C91558E008E7C0D /* Project object */;
523 | }
524 |
--------------------------------------------------------------------------------