From 4cc367c1d9f3c56f942691d67e8f108995a96cd1 Mon Sep 17 00:00:00 2001 From: Vitalii Obertynskyi Date: Sun, 6 Oct 2019 21:37:44 +0300 Subject: [PATCH 1/3] Upload photo --- demoapp/demoapp/Base.lproj/Main.storyboard | 58 +++++++- demoapp/demoapp/ViewController2.swift | 32 +---- .../Sources/VGSFramework/Core/Enums.swift | 7 + .../UIElements/Button/VGSButton.swift | 131 ++++++++++++++++++ .../Card Brand/CardBrand.swift | 0 .../Mask/MaskedTextField+padding.swift | 0 .../Mask/MaskedTextField.swift | 0 .../{ => Text Field}/State/State.swift | 0 .../VGSTextField+UIBuilder.swift | 0 .../{ => Text Field}/VGSTextField+state.swift | 0 .../{ => Text Field}/VGSTextField.swift | 0 .../Validation/Card/String+SwiftLuhn.swift | 0 .../Validation/Card/SwiftLuhn.swift | 0 .../Date+cvv/VGSValidation+type.swift | 0 .../Validation/Date+cvv/VGSValidation.swift | 0 .../VGSFramework.xcodeproj/project.pbxproj | 42 +++++- 16 files changed, 232 insertions(+), 38 deletions(-) create mode 100644 framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Card Brand/CardBrand.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Mask/MaskedTextField+padding.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Mask/MaskedTextField.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/State/State.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/VGSTextField+UIBuilder.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/VGSTextField+state.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/VGSTextField.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Validation/Card/String+SwiftLuhn.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Validation/Card/SwiftLuhn.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Validation/Date+cvv/VGSValidation+type.swift (100%) rename framework/Sources/VGSFramework/UIElements/{ => Text Field}/Validation/Date+cvv/VGSValidation.swift (100%) diff --git a/demoapp/demoapp/Base.lproj/Main.storyboard b/demoapp/demoapp/Base.lproj/Main.storyboard index 445a622a..1807b0c3 100644 --- a/demoapp/demoapp/Base.lproj/Main.storyboard +++ b/demoapp/demoapp/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -8,7 +8,7 @@ - + @@ -18,11 +18,61 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demoapp/demoapp/ViewController2.swift b/demoapp/demoapp/ViewController2.swift index 3ba16627..f2c98ca2 100644 --- a/demoapp/demoapp/ViewController2.swift +++ b/demoapp/demoapp/ViewController2.swift @@ -11,32 +11,10 @@ import VGSFramework class ViewController2: UIViewController { - @IBOutlet weak var textField: VGSTextField! - - var vgsCollector = VGSCollect(id: "test") - - override func viewDidLoad() { - super.viewDidLoad() - - let config = VGSConfiguration(collector: vgsCollector, fieldName: "test") - config.isRequired = false - config.placeholder = "name pppp" - config.type = .cardNumber - - textField.configuration = config - - textField.padding = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10) + @IBOutlet weak var button: VGSButton! { + didSet { + button.presentViewController = self + button.type = .library + } } - - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - // Get the new view controller using segue.destination. - // Pass the selected object to the new view controller. - } - */ - } diff --git a/framework/Sources/VGSFramework/Core/Enums.swift b/framework/Sources/VGSFramework/Core/Enums.swift index 4ee88b95..cc6176f1 100644 --- a/framework/Sources/VGSFramework/Core/Enums.swift +++ b/framework/Sources/VGSFramework/Core/Enums.swift @@ -76,3 +76,10 @@ public enum FieldType: Int, CaseIterable { } } } + +public enum ButtonType: Int, CaseIterable { + case none + case library + case camera + case file +} diff --git a/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift b/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift new file mode 100644 index 00000000..3934a6c5 --- /dev/null +++ b/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift @@ -0,0 +1,131 @@ +// +// VGSButton.swift +// VGSFramework +// +// Created by Vitalii Obertynskyi on 10/6/19. +// Copyright © 2019 Vitalii Obertynskyi. All rights reserved. +// + +import UIKit + +public class VGSButton: UIView { + private(set) weak var vgsCollector: VGSCollect? + internal var button = UIButton(type: .custom) + internal var fieldName: String! + internal var file: Data? + internal var image: UIImage? + internal var token: String? + + public var type: ButtonType = .none + public var presentViewController: UIViewController? + + public override init(frame: CGRect) { + super.init(frame: frame) + mainInitialization() + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + mainInitialization() + } + +// deinit { +// +// } + + // MARK: - private API + private func mainInitialization() { + + button.setTitle("Upload", for: .normal) + button.setTitleColor(.black, for: .normal) + + button.translatesAutoresizingMaskIntoConstraints = false + addSubview(button) + + let views = ["view": self, "button": button] + + let horizontalConstraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|-0-[button]-0-|", + options: .alignAllCenterY, + metrics: nil, + views: views) + NSLayoutConstraint.activate(horizontalConstraints) + + let verticalConstraint = NSLayoutConstraint.constraints(withVisualFormat: "V:|-0-[button]-0-|", + options: .alignAllCenterX, + metrics: nil, + views: views) + NSLayoutConstraint.activate(verticalConstraint) + + button.addTarget(self, action: #selector(buttonFunction(_:)), for: .touchUpInside) + } + + @objc + private func buttonFunction(_ sender: UIButton) { + switch type { + case .camera: + getImageFromCamera() + case .library: + getImageFromLibrary() + case .file: + #warning("Need to investigate work with icloud file") + break + default: + showAlert(message: "Need to set correct type for VGSButton") + } + } +} + +extension VGSButton: UIImagePickerControllerDelegate, UINavigationControllerDelegate { + internal func getImageFromLibrary() { + guard let presenter = presentViewController else { + fatalError("Need to set presentViewController for VGSButton") + } + + let picker = UIImagePickerController() + picker.sourceType = .savedPhotosAlbum + picker.delegate = self + presenter.present(picker, animated: true, completion: nil) + } + + internal func getImageFromCamera() { + guard let presenter = presentViewController else { + fatalError("Need to set presentViewController for VGSButton") + } + + if UIImagePickerController.isSourceTypeAvailable(.camera) == false { + showAlert(message: "No camera - no photo") + + } else { + let picker = UIImagePickerController() + picker.sourceType = .camera + presenter.present(picker, animated: true, completion: nil) + } + } + + // MARK: - UIImage picker delegate + public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { + picker.dismiss(animated: true, completion: nil) + } + + public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { + + let originalImage = info[.originalImage] as! UIImage + image = originalImage + + picker.dismiss(animated: true, completion: nil) + } +} + +extension VGSButton { + internal func showAlert(message string: String) { + guard let presenter = presentViewController else { + fatalError("Need to set presentViewController for VGSButton") + } + + let alert = UIAlertController(title: nil, + message: string, + preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: nil)) + presenter.present(alert, animated: true, completion: nil) + } +} diff --git a/framework/Sources/VGSFramework/UIElements/Card Brand/CardBrand.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Card Brand/CardBrand.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Card Brand/CardBrand.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Card Brand/CardBrand.swift diff --git a/framework/Sources/VGSFramework/UIElements/Mask/MaskedTextField+padding.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Mask/MaskedTextField+padding.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Mask/MaskedTextField+padding.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Mask/MaskedTextField+padding.swift diff --git a/framework/Sources/VGSFramework/UIElements/Mask/MaskedTextField.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Mask/MaskedTextField.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Mask/MaskedTextField.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Mask/MaskedTextField.swift diff --git a/framework/Sources/VGSFramework/UIElements/State/State.swift b/framework/Sources/VGSFramework/UIElements/Text Field/State/State.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/State/State.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/State/State.swift diff --git a/framework/Sources/VGSFramework/UIElements/VGSTextField+UIBuilder.swift b/framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField+UIBuilder.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/VGSTextField+UIBuilder.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField+UIBuilder.swift diff --git a/framework/Sources/VGSFramework/UIElements/VGSTextField+state.swift b/framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField+state.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/VGSTextField+state.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField+state.swift diff --git a/framework/Sources/VGSFramework/UIElements/VGSTextField.swift b/framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/VGSTextField.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/VGSTextField.swift diff --git a/framework/Sources/VGSFramework/UIElements/Validation/Card/String+SwiftLuhn.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Validation/Card/String+SwiftLuhn.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Validation/Card/String+SwiftLuhn.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Validation/Card/String+SwiftLuhn.swift diff --git a/framework/Sources/VGSFramework/UIElements/Validation/Card/SwiftLuhn.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Validation/Card/SwiftLuhn.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Validation/Card/SwiftLuhn.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Validation/Card/SwiftLuhn.swift diff --git a/framework/Sources/VGSFramework/UIElements/Validation/Date+cvv/VGSValidation+type.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Validation/Date+cvv/VGSValidation+type.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Validation/Date+cvv/VGSValidation+type.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Validation/Date+cvv/VGSValidation+type.swift diff --git a/framework/Sources/VGSFramework/UIElements/Validation/Date+cvv/VGSValidation.swift b/framework/Sources/VGSFramework/UIElements/Text Field/Validation/Date+cvv/VGSValidation.swift similarity index 100% rename from framework/Sources/VGSFramework/UIElements/Validation/Date+cvv/VGSValidation.swift rename to framework/Sources/VGSFramework/UIElements/Text Field/Validation/Date+cvv/VGSValidation.swift diff --git a/framework/VGSFramework.xcodeproj/project.pbxproj b/framework/VGSFramework.xcodeproj/project.pbxproj index fc033cf5..b06d5e4c 100644 --- a/framework/VGSFramework.xcodeproj/project.pbxproj +++ b/framework/VGSFramework.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ FDF696E123463ACB00063507 /* TextFielsStyleUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E023463ACA00063507 /* TextFielsStyleUI.swift */; }; FDF696E3234643F300063507 /* LuhnTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E2234643F300063507 /* LuhnTests.swift */; }; FDF696E52346461D00063507 /* StorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E42346461D00063507 /* StorageTests.swift */; }; + FDF696E9234A5D9A00063507 /* VGSButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E8234A5D9A00063507 /* VGSButton.swift */; }; FDFCA7FE233F7C1E00C81126 /* MaskedTextField+padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFCA7FD233F7C1E00C81126 /* MaskedTextField+padding.swift */; }; FDFCA800233F818C00C81126 /* CardBrandTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFCA7FF233F818C00C81126 /* CardBrandTests.swift */; }; /* End PBXBuildFile section */ @@ -90,6 +91,7 @@ FDF696E023463ACA00063507 /* TextFielsStyleUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFielsStyleUI.swift; sourceTree = ""; }; FDF696E2234643F300063507 /* LuhnTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuhnTests.swift; sourceTree = ""; }; FDF696E42346461D00063507 /* StorageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageTests.swift; sourceTree = ""; }; + FDF696E8234A5D9A00063507 /* VGSButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VGSButton.swift; sourceTree = ""; }; FDFCA7FD233F7C1E00C81126 /* MaskedTextField+padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MaskedTextField+padding.swift"; sourceTree = ""; }; FDFCA7FF233F818C00C81126 /* CardBrandTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardBrandTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -141,6 +143,7 @@ FD05F9372316CE5A000EAF52 /* VGSFramework */ = { isa = PBXGroup; children = ( + FDF696EC234A69F600063507 /* Extension */, FD05F9382316CE5A000EAF52 /* Core */, FD05F9402316CE5A000EAF52 /* Info.plist */, FD05F9432316CE5A000EAF52 /* UIElements */, @@ -165,13 +168,8 @@ FD05F9432316CE5A000EAF52 /* UIElements */ = { isa = PBXGroup; children = ( - FDD9028C232ED2040053BEBC /* Card Brand */, - FD1489FD232D4F8000FD7781 /* Mask */, - FD148A05232EC53600FD7781 /* State */, - FD2495622330E313009024E6 /* Validation */, - FD05F9442316CE5A000EAF52 /* VGSTextField.swift */, - FDD42A3C233F67BA0005D631 /* VGSTextField+UIBuilder.swift */, - FD1B44652327D9B0009AA04A /* VGSTextField+state.swift */, + FDF696E7234A5D8600063507 /* Button */, + FDF696E6234A5D7A00063507 /* Text Field */, ); path = UIElements; sourceTree = ""; @@ -291,6 +289,35 @@ path = "Text Fields Tests"; sourceTree = ""; }; + FDF696E6234A5D7A00063507 /* Text Field */ = { + isa = PBXGroup; + children = ( + FDD9028C232ED2040053BEBC /* Card Brand */, + FD1489FD232D4F8000FD7781 /* Mask */, + FD148A05232EC53600FD7781 /* State */, + FD2495622330E313009024E6 /* Validation */, + FD05F9442316CE5A000EAF52 /* VGSTextField.swift */, + FDD42A3C233F67BA0005D631 /* VGSTextField+UIBuilder.swift */, + FD1B44652327D9B0009AA04A /* VGSTextField+state.swift */, + ); + path = "Text Field"; + sourceTree = ""; + }; + FDF696E7234A5D8600063507 /* Button */ = { + isa = PBXGroup; + children = ( + FDF696E8234A5D9A00063507 /* VGSButton.swift */, + ); + path = Button; + sourceTree = ""; + }; + FDF696EC234A69F600063507 /* Extension */ = { + isa = PBXGroup; + children = ( + ); + path = Extension; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -478,6 +505,7 @@ FD05F9492316CE5A000EAF52 /* VGSCollect.swift in Sources */, FD05F9482316CE5A000EAF52 /* Enums.swift in Sources */, FDD9028E232ED2040053BEBC /* CardBrand.swift in Sources */, + FDF696E9234A5D9A00063507 /* VGSButton.swift in Sources */, FD1489FC232D4F6B00FD7781 /* APIClient.swift in Sources */, FD1B44612327A6C6009AA04A /* VGSCollect+extension.swift in Sources */, FD24956C2330E313009024E6 /* VGSValidation+type.swift in Sources */, From 37d3244524d5b6bba1b7fdd19867e1e0194b08dd Mon Sep 17 00:00:00 2001 From: Vitalii Obertynskyi Date: Sun, 6 Oct 2019 21:55:45 +0300 Subject: [PATCH 2/3] Added Tests for button --- .../UIElements/Button/VGSButton.swift | 4 +- .../FrameworkTests/Button/ButtonTests.swift | 48 +++++++++++++++++++ .../VGSFramework.xcodeproj/project.pbxproj | 12 +++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 framework/Tests/FrameworkTests/Button/ButtonTests.swift diff --git a/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift b/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift index 3934a6c5..ba14ef4d 100644 --- a/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift +++ b/framework/Sources/VGSFramework/UIElements/Button/VGSButton.swift @@ -56,11 +56,11 @@ public class VGSButton: UIView { views: views) NSLayoutConstraint.activate(verticalConstraint) - button.addTarget(self, action: #selector(buttonFunction(_:)), for: .touchUpInside) + button.addTarget(self, action: #selector(buttonAction), for: .touchUpInside) } @objc - private func buttonFunction(_ sender: UIButton) { + internal func buttonAction(_ sender: UIButton) { switch type { case .camera: getImageFromCamera() diff --git a/framework/Tests/FrameworkTests/Button/ButtonTests.swift b/framework/Tests/FrameworkTests/Button/ButtonTests.swift new file mode 100644 index 00000000..5ca72d5d --- /dev/null +++ b/framework/Tests/FrameworkTests/Button/ButtonTests.swift @@ -0,0 +1,48 @@ +// +// ButtonTests.swift +// FrameworkTests +// +// Created by Vitalii Obertynskyi on 10/6/19. +// Copyright © 2019 Vitalii Obertynskyi. All rights reserved. +// + +import XCTest +@testable import VGSFramework + +class ButtonTests: XCTestCase { + + var button: VGSButton! + + override func setUp() { + button = VGSButton(frame: .zero) + button.type = .library + button.presentViewController = UIViewController() + } + + override func tearDown() { + button = nil + } + + func testInitialization() { + XCTAssertNotNil(button.button) + XCTAssert(button.type != .none) + } + + func testAlert() { + button.showAlert(message: "test") + } + + func testGetImage() { + button.getImageFromLibrary() + } + + func testGetCamera() { + button.getImageFromCamera() + } + + func testTarget() { + let tmp = button.button.actions(forTarget: button, forControlEvent: .touchUpInside) + XCTAssertNotNil(tmp) + XCTAssert(tmp?.first == "buttonAction:") + } +} diff --git a/framework/VGSFramework.xcodeproj/project.pbxproj b/framework/VGSFramework.xcodeproj/project.pbxproj index b06d5e4c..7b2762c0 100644 --- a/framework/VGSFramework.xcodeproj/project.pbxproj +++ b/framework/VGSFramework.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ FDF696E3234643F300063507 /* LuhnTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E2234643F300063507 /* LuhnTests.swift */; }; FDF696E52346461D00063507 /* StorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E42346461D00063507 /* StorageTests.swift */; }; FDF696E9234A5D9A00063507 /* VGSButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696E8234A5D9A00063507 /* VGSButton.swift */; }; + FDF696EF234A6CD500063507 /* ButtonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF696EE234A6CD500063507 /* ButtonTests.swift */; }; FDFCA7FE233F7C1E00C81126 /* MaskedTextField+padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFCA7FD233F7C1E00C81126 /* MaskedTextField+padding.swift */; }; FDFCA800233F818C00C81126 /* CardBrandTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDFCA7FF233F818C00C81126 /* CardBrandTests.swift */; }; /* End PBXBuildFile section */ @@ -92,6 +93,7 @@ FDF696E2234643F300063507 /* LuhnTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuhnTests.swift; sourceTree = ""; }; FDF696E42346461D00063507 /* StorageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageTests.swift; sourceTree = ""; }; FDF696E8234A5D9A00063507 /* VGSButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VGSButton.swift; sourceTree = ""; }; + FDF696EE234A6CD500063507 /* ButtonTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonTests.swift; sourceTree = ""; }; FDFCA7FD233F7C1E00C81126 /* MaskedTextField+padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MaskedTextField+padding.swift"; sourceTree = ""; }; FDFCA7FF233F818C00C81126 /* CardBrandTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardBrandTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -216,6 +218,7 @@ FD2495522330CB49009024E6 /* FrameworkTests */ = { isa = PBXGroup; children = ( + FDF696ED234A6CC600063507 /* Button */, FDE890802333A75800FA170D /* Text Fields Tests */, FDFCA7FF233F818C00C81126 /* CardBrandTests.swift */, FD24955D2330CC62009024E6 /* CollectorTests.swift */, @@ -318,6 +321,14 @@ path = Extension; sourceTree = ""; }; + FDF696ED234A6CC600063507 /* Button */ = { + isa = PBXGroup; + children = ( + FDF696EE234A6CD500063507 /* ButtonTests.swift */, + ); + path = Button; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -527,6 +538,7 @@ FDF696E3234643F300063507 /* LuhnTests.swift in Sources */, FDF696E123463ACB00063507 /* TextFielsStyleUI.swift in Sources */, FDF696E52346461D00063507 /* StorageTests.swift in Sources */, + FDF696EF234A6CD500063507 /* ButtonTests.swift in Sources */, FD1BE48823462F1E006D8658 /* ExpDateTextFieldTests.swift in Sources */, FD24955E2330CC62009024E6 /* CollectorTests.swift in Sources */, ); From bfd98d84fc6a283c3dc7718c2c891e6bc0c1b996 Mon Sep 17 00:00:00 2001 From: Vitalii Obertynskyi Date: Tue, 8 Oct 2019 22:36:19 +0300 Subject: [PATCH 3/3] Update Main.storyboard --- demoapp/demoapp/Base.lproj/Main.storyboard | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demoapp/demoapp/Base.lproj/Main.storyboard b/demoapp/demoapp/Base.lproj/Main.storyboard index 1807b0c3..547b9c06 100644 --- a/demoapp/demoapp/Base.lproj/Main.storyboard +++ b/demoapp/demoapp/Base.lproj/Main.storyboard @@ -24,7 +24,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -62,6 +62,7 @@ +