Commit bd7e697ad5d44e3eea4269dbec8071aeed5eeaa2

Authored by vlad.lopatynets
1 parent 2973e931

fix delegate

... ... @@ -6,3 +6,29 @@
6 6 //
7 7
8 8 import Foundation
  9 +import UIKit
  10 +
  11 +extension UIColor {
  12 + enum TextColor {
  13 + static let darkBlue = UIColor(named: "DarkBlueText")
  14 + static let lightGrey = UIColor(named: "LightGreyText")
  15 + static let redError = UIColor(named: "RedErrorText")
  16 + }
  17 +
  18 + enum TextFieldColor {
  19 + static let general = UIColor(named: "GeneralTextField")
  20 + static let error = UIColor(named: "ErrorTextField")
  21 + }
  22 +
  23 + enum GradientBlue {
  24 + static let left = UIColor(named: "Left")
  25 + static let right = UIColor(named: "Right")
  26 + }
  27 +
  28 +}
  29 +extension CGColor {
  30 + enum ButtonBorderColor {
  31 + static let lightGrey = UIColor(named: "LightGreyBorderColor")?.cgColor
  32 + static let lightBlue = UIColor(named: "LightBlueBorderColor")?.cgColor
  33 + }
  34 +}
... ...
... ... @@ -7,9 +7,19 @@
7 7 objects = {
8 8
9 9 /* Begin PBXBuildFile section */
  10 + 00A48B62285F8CDD00EF0A08 /* CodeVerificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B5F285F8CDD00EF0A08 /* CodeVerificationView.swift */; };
  11 + 00A48B63285F8CDD00EF0A08 /* CodeVerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B61285F8CDD00EF0A08 /* CodeVerificationViewController.swift */; };
  12 + 00A48B6A285F8CEA00EF0A08 /* AddResidentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B66285F8CEA00EF0A08 /* AddResidentsView.swift */; };
  13 + 00A48B6B285F8CEA00EF0A08 /* ResidentModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B67285F8CEA00EF0A08 /* ResidentModel.swift */; };
  14 + 00A48B6C285F8CEA00EF0A08 /* AddResidentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B69285F8CEA00EF0A08 /* AddResidentsViewController.swift */; };
  15 + 00A48B6E285F8E5700EF0A08 /* TextFieldWithPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B6D285F8E5700EF0A08 /* TextFieldWithPadding.swift */; };
  16 + 00A48B71285F8E8200EF0A08 /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B70285F8E8200EF0A08 /* HomeTableViewCell.swift */; };
  17 + 00A48B73285F8EB000EF0A08 /* SquereCheckBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B72285F8EB000EF0A08 /* SquereCheckBox.swift */; };
  18 + 00A48B76285F8EE800EF0A08 /* Colors + Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B75285F8EE800EF0A08 /* Colors + Extension.swift */; };
  19 + 00A48B7A285F8F6600EF0A08 /* Reusable + Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B78285F8F6600EF0A08 /* Reusable + Cell.swift */; };
  20 + 00A48B7B285F8F6600EF0A08 /* ProtocolDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B79285F8F6600EF0A08 /* ProtocolDelegate.swift */; };
  21 + 00A48B7F285F8F9200EF0A08 /* ContactPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00A48B7E285F8F9200EF0A08 /* ContactPickerViewController.swift */; };
10 22 00E581BB284F71CD00E779FB /* Checkbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E581BA284F71CD00E779FB /* Checkbox.swift */; };
11   - 17058D52284A4F150078DD82 /* CodeVerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17058D51284A4F150078DD82 /* CodeVerificationViewController.swift */; };
12   - 17058D54284A4F670078DD82 /* CodeVerificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17058D53284A4F670078DD82 /* CodeVerificationView.swift */; };
13 23 17287C602848AD8D00AA7113 /* Fonts + Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17287C5F2848AD8D00AA7113 /* Fonts + Extension.swift */; };
14 24 17287C692848C69600AA7113 /* Sk-Modernist-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 17287C642848C69600AA7113 /* Sk-Modernist-Bold.otf */; };
15 25 17287C6A2848C69600AA7113 /* Sk-Modernist-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 17287C652848C69600AA7113 /* Sk-Modernist-Regular.otf */; };
... ... @@ -17,13 +27,10 @@
17 27 1729E21D28465163006C7C29 /* PhoneService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1729E21C28465162006C7C29 /* PhoneService.swift */; };
18 28 1729E21F28465595006C7C29 /* PhoneNumberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1729E21E28465595006C7C29 /* PhoneNumberView.swift */; };
19 29 1729E22128465DA9006C7C29 /* PhonePickerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1729E22028465DA9006C7C29 /* PhonePickerModel.swift */; };
20   - 1732AC71284769B50042C9F7 /* TextFieldWithPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1732AC70284769B50042C9F7 /* TextFieldWithPadding.swift */; };
21 30 1732AC7328477BB40042C9F7 /* PickerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */; };
22 31 1738F7D82850F5D5003F1806 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1738F7D72850F5D5003F1806 /* SettingsViewController.swift */; };
23 32 1738F7DA2850F5F1003F1806 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1738F7D92850F5F1003F1806 /* SettingsView.swift */; };
24   - 175DA4722852416D0075F0A9 /* Reusable+cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175DA4712852416D0075F0A9 /* Reusable+cell.swift */; };
25 33 175DA474285241C90075F0A9 /* SettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175DA473285241C90075F0A9 /* SettingsModel.swift */; };
26   - 178A61D12850DDAA001509A4 /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 178A61D02850DDAA001509A4 /* HomeTableViewCell.swift */; };
27 34 17ABE070285B80DC0006E7EC /* DisplayNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE06F285B80DC0006E7EC /* DisplayNameCell.swift */; };
28 35 17ABE072285B810F0006E7EC /* SettingsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE071285B810F0006E7EC /* SettingsTableViewCell.swift */; };
29 36 17ABE074285B81390006E7EC /* SettingsSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE073285B81390006E7EC /* SettingsSwitchCell.swift */; };
... ... @@ -34,8 +41,6 @@
34 41 17CD09A42858EE39008483E2 /* ChooseApartmentsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09A32858EE39008483E2 /* ChooseApartmentsTableViewCell.swift */; };
35 42 17CD09AA2858F979008483E2 /* ResidentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09A92858F979008483E2 /* ResidentsViewController.swift */; };
36 43 17CD09AC2858F9B0008483E2 /* ResidentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09AB2858F9B0008483E2 /* ResidentsView.swift */; };
37   - 17CD09B12859110A008483E2 /* AddResidentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09B02859110A008483E2 /* AddResidentsViewController.swift */; };
38   - 17CD09B3285911C8008483E2 /* AddResidentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09B2285911C8008483E2 /* AddResidentsView.swift */; };
39 44 17CF9EE12844ED8F000D8077 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */; };
40 45 17CF9EE32844ED8F000D8077 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE22844ED8F000D8077 /* SceneDelegate.swift */; };
41 46 17CF9EE52844ED8F000D8077 /* VerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE42844ED8F000D8077 /* VerificationViewController.swift */; };
... ... @@ -46,9 +51,19 @@
46 51 /* End PBXBuildFile section */
47 52
48 53 /* Begin PBXFileReference section */
  54 + 00A48B5F285F8CDD00EF0A08 /* CodeVerificationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeVerificationView.swift; sourceTree = "<group>"; };
  55 + 00A48B61285F8CDD00EF0A08 /* CodeVerificationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeVerificationViewController.swift; sourceTree = "<group>"; };
  56 + 00A48B66285F8CEA00EF0A08 /* AddResidentsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddResidentsView.swift; sourceTree = "<group>"; };
  57 + 00A48B67285F8CEA00EF0A08 /* ResidentModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResidentModel.swift; sourceTree = "<group>"; };
  58 + 00A48B69285F8CEA00EF0A08 /* AddResidentsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddResidentsViewController.swift; sourceTree = "<group>"; };
  59 + 00A48B6D285F8E5700EF0A08 /* TextFieldWithPadding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextFieldWithPadding.swift; sourceTree = "<group>"; };
  60 + 00A48B70285F8E8200EF0A08 /* HomeTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeTableViewCell.swift; sourceTree = "<group>"; };
  61 + 00A48B72285F8EB000EF0A08 /* SquereCheckBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SquereCheckBox.swift; sourceTree = "<group>"; };
  62 + 00A48B75285F8EE800EF0A08 /* Colors + Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Colors + Extension.swift"; sourceTree = "<group>"; };
  63 + 00A48B78285F8F6600EF0A08 /* Reusable + Cell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Reusable + Cell.swift"; sourceTree = "<group>"; };
  64 + 00A48B79285F8F6600EF0A08 /* ProtocolDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProtocolDelegate.swift; sourceTree = "<group>"; };
  65 + 00A48B7E285F8F9200EF0A08 /* ContactPickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactPickerViewController.swift; sourceTree = "<group>"; };
49 66 00E581BA284F71CD00E779FB /* Checkbox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checkbox.swift; sourceTree = "<group>"; };
50   - 17058D51284A4F150078DD82 /* CodeVerificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeVerificationViewController.swift; sourceTree = "<group>"; };
51   - 17058D53284A4F670078DD82 /* CodeVerificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeVerificationView.swift; sourceTree = "<group>"; };
52 67 17287C5F2848AD8D00AA7113 /* Fonts + Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Fonts + Extension.swift"; sourceTree = "<group>"; };
53 68 17287C642848C69600AA7113 /* Sk-Modernist-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Sk-Modernist-Bold.otf"; sourceTree = "<group>"; };
54 69 17287C652848C69600AA7113 /* Sk-Modernist-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Sk-Modernist-Regular.otf"; sourceTree = "<group>"; };
... ... @@ -56,13 +71,10 @@
56 71 1729E21C28465162006C7C29 /* PhoneService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneService.swift; sourceTree = "<group>"; };
57 72 1729E21E28465595006C7C29 /* PhoneNumberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneNumberView.swift; sourceTree = "<group>"; };
58 73 1729E22028465DA9006C7C29 /* PhonePickerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhonePickerModel.swift; sourceTree = "<group>"; };
59   - 1732AC70284769B50042C9F7 /* TextFieldWithPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldWithPadding.swift; sourceTree = "<group>"; };
60 74 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerViewCell.swift; sourceTree = "<group>"; };
61 75 1738F7D72850F5D5003F1806 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
62 76 1738F7D92850F5F1003F1806 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
63   - 175DA4712852416D0075F0A9 /* Reusable+cell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Reusable+cell.swift"; sourceTree = "<group>"; };
64 77 175DA473285241C90075F0A9 /* SettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsModel.swift; sourceTree = "<group>"; };
65   - 178A61D02850DDAA001509A4 /* HomeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTableViewCell.swift; sourceTree = "<group>"; };
66 78 17ABE06F285B80DC0006E7EC /* DisplayNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayNameCell.swift; sourceTree = "<group>"; };
67 79 17ABE071285B810F0006E7EC /* SettingsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTableViewCell.swift; sourceTree = "<group>"; };
68 80 17ABE073285B81390006E7EC /* SettingsSwitchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSwitchCell.swift; sourceTree = "<group>"; };
... ... @@ -73,8 +85,6 @@
73 85 17CD09A32858EE39008483E2 /* ChooseApartmentsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseApartmentsTableViewCell.swift; sourceTree = "<group>"; };
74 86 17CD09A92858F979008483E2 /* ResidentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResidentsViewController.swift; sourceTree = "<group>"; };
75 87 17CD09AB2858F9B0008483E2 /* ResidentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResidentsView.swift; sourceTree = "<group>"; };
76   - 17CD09B02859110A008483E2 /* AddResidentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddResidentsViewController.swift; sourceTree = "<group>"; };
77   - 17CD09B2285911C8008483E2 /* AddResidentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddResidentsView.swift; sourceTree = "<group>"; };
78 88 17CF9EDD2844ED8F000D8077 /* InterQR-Internship.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "InterQR-Internship.app"; sourceTree = BUILT_PRODUCTS_DIR; };
79 89 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
80 90 17CF9EE22844ED8F000D8077 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
... ... @@ -100,69 +110,136 @@
100 110 /* End PBXFrameworksBuildPhase section */
101 111
102 112 /* Begin PBXGroup section */
103   - 00E581B0284F666000E779FB /* Modules */ = {
  113 + 00A48B5D285F8CDD00EF0A08 /* OneTimePasswordScreen */ = {
104 114 isa = PBXGroup;
105 115 children = (
106   - 17CD09AD28591073008483E2 /* AddResidentsViewController */,
107   - 17CD09A62858F931008483E2 /* ResidentsScreen */,
108   - 17B0254328587434004225AE /* ChooseApartmentsScreen */,
109   - 1738F7D42850F5A1003F1806 /* SettingsScreen */,
110   - 17ABFE54284FD1C8003B6959 /* HomeScreen */,
111   - 00E581B1284F666600E779FB /* VerificationSceen */,
112   - 00E581B4284F669600E779FB /* OTPScreen */,
  116 + 00A48B5E285F8CDD00EF0A08 /* View */,
  117 + 00A48B60285F8CDD00EF0A08 /* ViewController */,
113 118 );
114   - path = Modules;
  119 + path = OneTimePasswordScreen;
115 120 sourceTree = "<group>";
116 121 };
117   - 00E581B1284F666600E779FB /* VerificationSceen */ = {
  122 + 00A48B5E285F8CDD00EF0A08 /* View */ = {
118 123 isa = PBXGroup;
119 124 children = (
120   - 00E581B3284F667C00E779FB /* ViewController */,
121   - 00E581B2284F667600E779FB /* View */,
  125 + 00A48B5F285F8CDD00EF0A08 /* CodeVerificationView.swift */,
122 126 );
123   - path = VerificationSceen;
  127 + path = View;
124 128 sourceTree = "<group>";
125 129 };
126   - 00E581B2284F667600E779FB /* View */ = {
  130 + 00A48B60285F8CDD00EF0A08 /* ViewController */ = {
127 131 isa = PBXGroup;
128 132 children = (
129   - 1729E21E28465595006C7C29 /* PhoneNumberView.swift */,
130   - 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */,
131   - 1732AC70284769B50042C9F7 /* TextFieldWithPadding.swift */,
132   - 17CF9EF62844EF8B000D8077 /* VerificationView.swift */,
  133 + 00A48B61285F8CDD00EF0A08 /* CodeVerificationViewController.swift */,
  134 + );
  135 + path = ViewController;
  136 + sourceTree = "<group>";
  137 + };
  138 + 00A48B64285F8CEA00EF0A08 /* AddResidentsScreen */ = {
  139 + isa = PBXGroup;
  140 + children = (
  141 + 00A48B65285F8CEA00EF0A08 /* View */,
  142 + 00A48B67285F8CEA00EF0A08 /* ResidentModel.swift */,
  143 + 00A48B68285F8CEA00EF0A08 /* ViewController */,
  144 + );
  145 + path = AddResidentsScreen;
  146 + sourceTree = "<group>";
  147 + };
  148 + 00A48B65285F8CEA00EF0A08 /* View */ = {
  149 + isa = PBXGroup;
  150 + children = (
  151 + 00A48B66285F8CEA00EF0A08 /* AddResidentsView.swift */,
133 152 );
134 153 path = View;
135 154 sourceTree = "<group>";
136 155 };
137   - 00E581B3284F667C00E779FB /* ViewController */ = {
  156 + 00A48B68285F8CEA00EF0A08 /* ViewController */ = {
138 157 isa = PBXGroup;
139 158 children = (
140   - 17CF9EE42844ED8F000D8077 /* VerificationViewController.swift */,
  159 + 00A48B69285F8CEA00EF0A08 /* AddResidentsViewController.swift */,
  160 + );
  161 + path = ViewController;
  162 + sourceTree = "<group>";
  163 + };
  164 + 00A48B6F285F8E8200EF0A08 /* Cell */ = {
  165 + isa = PBXGroup;
  166 + children = (
  167 + 00A48B70285F8E8200EF0A08 /* HomeTableViewCell.swift */,
  168 + );
  169 + path = Cell;
  170 + sourceTree = "<group>";
  171 + };
  172 + 00A48B74285F8EE800EF0A08 /* Colors + Extension */ = {
  173 + isa = PBXGroup;
  174 + children = (
  175 + 00A48B75285F8EE800EF0A08 /* Colors + Extension.swift */,
  176 + );
  177 + path = "Colors + Extension";
  178 + sourceTree = SOURCE_ROOT;
  179 + };
  180 + 00A48B77285F8F6600EF0A08 /* Protocols */ = {
  181 + isa = PBXGroup;
  182 + children = (
  183 + 00A48B78285F8F6600EF0A08 /* Reusable + Cell.swift */,
  184 + 00A48B79285F8F6600EF0A08 /* ProtocolDelegate.swift */,
  185 + );
  186 + path = Protocols;
  187 + sourceTree = "<group>";
  188 + };
  189 + 00A48B7C285F8F9200EF0A08 /* ContactPickerScreen */ = {
  190 + isa = PBXGroup;
  191 + children = (
  192 + 00A48B7D285F8F9200EF0A08 /* ViewController */,
  193 + );
  194 + path = ContactPickerScreen;
  195 + sourceTree = "<group>";
  196 + };
  197 + 00A48B7D285F8F9200EF0A08 /* ViewController */ = {
  198 + isa = PBXGroup;
  199 + children = (
  200 + 00A48B7E285F8F9200EF0A08 /* ContactPickerViewController.swift */,
141 201 );
142 202 path = ViewController;
143 203 sourceTree = "<group>";
144 204 };
145   - 00E581B4284F669600E779FB /* OTPScreen */ = {
  205 + 00E581B0284F666000E779FB /* Modules */ = {
146 206 isa = PBXGroup;
147 207 children = (
148   - 00E581B6284F66B400E779FB /* ViewController */,
149   - 00E581B5284F66AB00E779FB /* View */,
  208 + 00A48B7C285F8F9200EF0A08 /* ContactPickerScreen */,
  209 + 00A48B64285F8CEA00EF0A08 /* AddResidentsScreen */,
  210 + 00A48B5D285F8CDD00EF0A08 /* OneTimePasswordScreen */,
  211 + 17CD09A62858F931008483E2 /* ResidentsScreen */,
  212 + 17B0254328587434004225AE /* ChooseApartmentsScreen */,
  213 + 1738F7D42850F5A1003F1806 /* SettingsScreen */,
  214 + 17ABFE54284FD1C8003B6959 /* HomeScreen */,
  215 + 00E581B1284F666600E779FB /* VerificationSceen */,
150 216 );
151   - path = OTPScreen;
  217 + path = Modules;
152 218 sourceTree = "<group>";
153 219 };
154   - 00E581B5284F66AB00E779FB /* View */ = {
  220 + 00E581B1284F666600E779FB /* VerificationSceen */ = {
155 221 isa = PBXGroup;
156 222 children = (
157   - 17058D53284A4F670078DD82 /* CodeVerificationView.swift */,
  223 + 00E581B3284F667C00E779FB /* ViewController */,
  224 + 00E581B2284F667600E779FB /* View */,
  225 + );
  226 + path = VerificationSceen;
  227 + sourceTree = "<group>";
  228 + };
  229 + 00E581B2284F667600E779FB /* View */ = {
  230 + isa = PBXGroup;
  231 + children = (
  232 + 1729E21E28465595006C7C29 /* PhoneNumberView.swift */,
  233 + 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */,
  234 + 17CF9EF62844EF8B000D8077 /* VerificationView.swift */,
158 235 );
159 236 path = View;
160 237 sourceTree = "<group>";
161 238 };
162   - 00E581B6284F66B400E779FB /* ViewController */ = {
  239 + 00E581B3284F667C00E779FB /* ViewController */ = {
163 240 isa = PBXGroup;
164 241 children = (
165   - 17058D51284A4F150078DD82 /* CodeVerificationViewController.swift */,
  242 + 17CF9EE42844ED8F000D8077 /* VerificationViewController.swift */,
166 243 );
167 244 path = ViewController;
168 245 sourceTree = "<group>";
... ... @@ -178,6 +255,7 @@
178 255 00E581B8284F71AE00E779FB /* CustomUI */ = {
179 256 isa = PBXGroup;
180 257 children = (
  258 + 00A48B6D285F8E5700EF0A08 /* TextFieldWithPadding.swift */,
181 259 00E581B9284F71B700E779FB /* Checkbox */,
182 260 );
183 261 path = CustomUI;
... ... @@ -186,6 +264,7 @@
186 264 00E581B9284F71B700E779FB /* Checkbox */ = {
187 265 isa = PBXGroup;
188 266 children = (
  267 + 00A48B72285F8EB000EF0A08 /* SquereCheckBox.swift */,
189 268 00E581BA284F71CD00E779FB /* Checkbox.swift */,
190 269 );
191 270 path = Checkbox;
... ... @@ -256,8 +335,8 @@
256 335 17ABFE56284FD1F5003B6959 /* VIew */ = {
257 336 isa = PBXGroup;
258 337 children = (
  338 + 00A48B6F285F8E8200EF0A08 /* Cell */,
259 339 17ABFE59284FD293003B6959 /* HomeView.swift */,
260   - 178A61D02850DDAA001509A4 /* HomeTableViewCell.swift */,
261 340 );
262 341 path = VIew;
263 342 sourceTree = "<group>";
... ... @@ -321,31 +400,6 @@
321 400 path = View;
322 401 sourceTree = "<group>";
323 402 };
324   - 17CD09AD28591073008483E2 /* AddResidentsViewController */ = {
325   - isa = PBXGroup;
326   - children = (
327   - 17CD09AE2859108B008483E2 /* ViewController */,
328   - 17CD09AF285910FA008483E2 /* View */,
329   - );
330   - path = AddResidentsViewController;
331   - sourceTree = "<group>";
332   - };
333   - 17CD09AE2859108B008483E2 /* ViewController */ = {
334   - isa = PBXGroup;
335   - children = (
336   - 17CD09B02859110A008483E2 /* AddResidentsViewController.swift */,
337   - );
338   - path = ViewController;
339   - sourceTree = "<group>";
340   - };
341   - 17CD09AF285910FA008483E2 /* View */ = {
342   - isa = PBXGroup;
343   - children = (
344   - 17CD09B2285911C8008483E2 /* AddResidentsView.swift */,
345   - );
346   - path = View;
347   - sourceTree = "<group>";
348   - };
349 403 17CF9ED42844ED8F000D8077 = {
350 404 isa = PBXGroup;
351 405 children = (
... ... @@ -369,7 +423,8 @@
369 423 17CF9EDF2844ED8F000D8077 /* InterQR-Internship */ = {
370 424 isa = PBXGroup;
371 425 children = (
372   - 175DA4712852416D0075F0A9 /* Reusable+cell.swift */,
  426 + 00A48B77285F8F6600EF0A08 /* Protocols */,
  427 + 00A48B74285F8EE800EF0A08 /* Colors + Extension */,
373 428 00E581B7284F71A700E779FB /* Common */,
374 429 00E581B0284F666000E779FB /* Modules */,
375 430 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */,
... ... @@ -535,33 +590,38 @@
535 590 isa = PBXSourcesBuildPhase;
536 591 buildActionMask = 2147483647;
537 592 files = (
538   - 17CD09B12859110A008483E2 /* AddResidentsViewController.swift in Sources */,
539 593 17ABE070285B80DC0006E7EC /* DisplayNameCell.swift in Sources */,
  594 + 00A48B73285F8EB000EF0A08 /* SquereCheckBox.swift in Sources */,
540 595 1729E22128465DA9006C7C29 /* PhonePickerModel.swift in Sources */,
541   - 17058D52284A4F150078DD82 /* CodeVerificationViewController.swift in Sources */,
542   - 1732AC71284769B50042C9F7 /* TextFieldWithPadding.swift in Sources */,
543 596 17ABFE5A284FD293003B6959 /* HomeView.swift in Sources */,
  597 + 00A48B7B285F8F6600EF0A08 /* ProtocolDelegate.swift in Sources */,
544 598 1732AC7328477BB40042C9F7 /* PickerViewCell.swift in Sources */,
545 599 1729E21F28465595006C7C29 /* PhoneNumberView.swift in Sources */,
546 600 17ABE072285B810F0006E7EC /* SettingsTableViewCell.swift in Sources */,
547 601 17CD09AC2858F9B0008483E2 /* ResidentsView.swift in Sources */,
  602 + 00A48B7A285F8F6600EF0A08 /* Reusable + Cell.swift in Sources */,
  603 + 00A48B71285F8E8200EF0A08 /* HomeTableViewCell.swift in Sources */,
  604 + 00A48B6E285F8E5700EF0A08 /* TextFieldWithPadding.swift in Sources */,
548 605 17B0254628587716004225AE /* ChooseApartmentsViewController.swift in Sources */,
549   - 175DA4722852416D0075F0A9 /* Reusable+cell.swift in Sources */,
550 606 17ABFE58284FD20C003B6959 /* HomeViewController.swift in Sources */,
551 607 17CF9EE52844ED8F000D8077 /* VerificationViewController.swift in Sources */,
552   - 17058D54284A4F670078DD82 /* CodeVerificationView.swift in Sources */,
  608 + 00A48B76285F8EE800EF0A08 /* Colors + Extension.swift in Sources */,
  609 + 00A48B6C285F8CEA00EF0A08 /* AddResidentsViewController.swift in Sources */,
553 610 175DA474285241C90075F0A9 /* SettingsModel.swift in Sources */,
554 611 17CF9EE12844ED8F000D8077 /* AppDelegate.swift in Sources */,
  612 + 00A48B62285F8CDD00EF0A08 /* CodeVerificationView.swift in Sources */,
555 613 17CD09A42858EE39008483E2 /* ChooseApartmentsTableViewCell.swift in Sources */,
556 614 1729E21D28465163006C7C29 /* PhoneService.swift in Sources */,
557 615 17CF9EE32844ED8F000D8077 /* SceneDelegate.swift in Sources */,
558 616 1738F7D82850F5D5003F1806 /* SettingsViewController.swift in Sources */,
559 617 1738F7DA2850F5F1003F1806 /* SettingsView.swift in Sources */,
  618 + 00A48B7F285F8F9200EF0A08 /* ContactPickerViewController.swift in Sources */,
560 619 17CD09AA2858F979008483E2 /* ResidentsViewController.swift in Sources */,
561 620 00E581BB284F71CD00E779FB /* Checkbox.swift in Sources */,
  621 + 00A48B6B285F8CEA00EF0A08 /* ResidentModel.swift in Sources */,
562 622 17287C602848AD8D00AA7113 /* Fonts + Extension.swift in Sources */,
563   - 17CD09B3285911C8008483E2 /* AddResidentsView.swift in Sources */,
564   - 178A61D12850DDAA001509A4 /* HomeTableViewCell.swift in Sources */,
  623 + 00A48B6A285F8CEA00EF0A08 /* AddResidentsView.swift in Sources */,
  624 + 00A48B63285F8CDD00EF0A08 /* CodeVerificationViewController.swift in Sources */,
565 625 17ABE074285B81390006E7EC /* SettingsSwitchCell.swift in Sources */,
566 626 17CF9EF72844EF8B000D8077 /* VerificationView.swift in Sources */,
567 627 17B0254828587726004225AE /* ChooseApartmentsView.swift in Sources */,
... ...
... ... @@ -7,15 +7,9 @@
7 7
8 8 import UIKit
9 9
10   -protocol ViewDelegate: AnyObject {
11   - func viewDidTapImage()
12   -}
13   -
14 10 class AddResidentsView: UIView {
15 11 var isShow: Bool = false
16 12
17   - weak var delegate: ViewDelegate?
18   -
19 13 let blurEffect: UIVisualEffectView = {
20 14 let blur = UIBlurEffect(style: UIBlurEffect.Style.systemMaterialDark)
21 15 let obj = UIVisualEffectView(effect: blur)
... ... @@ -25,11 +19,9 @@ class AddResidentsView: UIView {
25 19 return obj
26 20 }()
27 21
28   - lazy var transparentView: UIView = {
  22 + let transparentView: UIView = {
29 23 var obj = UIView()
30 24 obj.isUserInteractionEnabled = true
31   - var tap = UIGestureRecognizer(target: self, action: #selector(imageTapped))
32   - obj.addGestureRecognizer(tap)
33 25 obj.backgroundColor = .black
34 26 obj.alpha = 0.5
35 27 return obj
... ... @@ -62,7 +54,7 @@ class AddResidentsView: UIView {
62 54
63 55 var dividingLineView: UIView = {
64 56 var view = UIView()
65   - view.backgroundColor = MyColor.dividingLineBackgroundColor.value
  57 + view.backgroundColor = .systemGray
66 58 return view
67 59 }()
68 60
... ... @@ -89,13 +81,13 @@ class AddResidentsView: UIView {
89 81 var obj = UILabel()
90 82 obj.text = "Mobile number"
91 83 obj.font = .skModernist(type: .bold, ofSize: 14)
92   - obj.textColor = MyColor.darkBlueTextColor.value
  84 + obj.textColor = .TextColor.lightGrey
93 85 return obj
94 86 }()
95 87
96 88 var mobileNumberTextField: TextFieldWithPadding = {
97 89 var obj = TextFieldWithPadding()
98   - obj.backgroundColor = MyColor.generalTextFieldBackgroundColor.value
  90 + obj.backgroundColor = .TextFieldColor.general
99 91 obj.textAlignment = .left
100 92 obj.layer.cornerRadius = 15
101 93 obj.font = .skModernist(type: .regular, ofSize: 14)
... ... @@ -264,8 +256,4 @@ class AddResidentsView: UIView {
264 256 gradientBG.frame = addResidentButton.bounds
265 257 blurEffect.frame = transparentView.bounds
266 258 }
267   -
268   - @objc func imageTapped() {
269   - delegate?.viewDidTapImage()
270   - }
271 259 }
... ...
... ... @@ -8,8 +8,8 @@
8 8 import UIKit
9 9 import ContactsUI
10 10
11   -class AddResidentsViewController: UIViewController, ViewDelegate {
12   - var myData: ResidentModel?
  11 +class AddResidentsViewController: UIViewController {
  12 +// var myData: ResidentModel?
13 13
14 14 var savedResidents: [ResidentModel] = []
15 15
... ... @@ -21,6 +21,8 @@ class AddResidentsViewController: UIViewController, ViewDelegate {
21 21
22 22 var mainView = AddResidentsView()
23 23
  24 + var closeTap: UITapGestureRecognizer?
  25 +
24 26 override func loadView() {
25 27 view = mainView
26 28 }
... ... @@ -31,16 +33,18 @@ class AddResidentsViewController: UIViewController, ViewDelegate {
31 33 }
32 34
33 35 func initViewController() {
  36 + self.closeTap = UITapGestureRecognizer(target: self, action: #selector(didTapCloseButton))
  37 + if let closeTap = self.closeTap {
  38 + mainView.transparentView.addGestureRecognizer(closeTap)
  39 + }
  40 +
34 41 mainView.closeButton.addTarget(self, action: #selector(didTapCloseButton), for: .touchUpInside)
35 42 mainView.managerButton.addTarget(self, action: #selector(didTapOnChangeableButtons(_:)), for: .touchUpInside)
36 43 mainView.hiddenButton.addTarget(self, action: #selector(didTapOnChangeableButtons(_:)), for: .touchUpInside)
37 44 mainView.heartButton.addTarget(self, action: #selector(didTapOnChangeableButtons(_:)), for: .touchUpInside)
38 45 mainView.addResidentButton.addTarget(self, action: #selector(didTapResidentButton), for: .touchUpInside)
39 46 mainView.contactListButton.addTarget(self, action: #selector(didTapContactListButton), for: .touchUpInside)
40   -
41   - mainView.delegate = self
42   - gestureSetup(mainView.transparentView)
43   -
  47 +
44 48 NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil)
45 49 NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
46 50 }
... ... @@ -50,17 +54,6 @@ class AddResidentsViewController: UIViewController, ViewDelegate {
50 54 NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil)
51 55 }
52 56
53   - @objc func viewDidTapImage() {
54   - print("🕵️‍♂️")
55   - }
56   -
57   - func gestureSetup(_ view: UIView) {
58   - let tapGesture = UIGestureRecognizer()
59   - tapGesture.addTarget(self, action: #selector(gestureFired))
60   - view.addGestureRecognizer(tapGesture)
61   - view.isUserInteractionEnabled = true
62   - }
63   -
64 57 @objc private func gestureFired() {
65 58 print("❌")
66 59
... ... @@ -70,6 +63,7 @@ class AddResidentsViewController: UIViewController, ViewDelegate {
70 63 mainView.mobileNumberTextField.reloadInputViews()
71 64 }
72 65
  66 +
73 67 @objc private func didTapCloseButton() {
74 68 dismiss(animated: true, completion: nil)
75 69 }
... ... @@ -81,13 +75,19 @@ class AddResidentsViewController: UIViewController, ViewDelegate {
81 75 }
82 76
83 77 func didReceiveData() {
84   - mainView.nameTextField.text = myData?.name
85   - mainView.mobileNumberTextField.text = myData?.mobileNumber
86   - mainView.managerButton.isSelected = ((myData?.manager) != nil)
87   - mainView.hiddenButton.isSelected = ((myData?.hidden) != nil)
88   - mainView.heartButton.isSelected = ((myData?.hidden) != nil)
  78 + guard let name = mainView.nameTextField.text,
  79 + let mobileNumber = mainView.mobileNumberTextField.text
  80 + else {
  81 + return
  82 + }
  83 +
  84 + let model = ResidentModel(name: name,
  85 + mobileNumber: mobileNumber,
  86 + manager: mainView.managerButton.isSelected,
  87 + hidden: mainView.hiddenButton.isSelected,
  88 + heart: mainView.heartButton.isSelected)
89 89
90   - delegate?.save(myData!)
  90 + delegate?.save(model)
91 91 }
92 92
93 93 @objc private func didTapOnChangeableButtons(_ sender: SquereCheckbox) {
... ...
... ... @@ -6,3 +6,20 @@
6 6 //
7 7
8 8 import Foundation
  9 +import UIKit
  10 +import ContactsUI
  11 +
  12 +class ContactPickerViewController: CNContactPickerViewController {
  13 + var phoneNumber = ""
  14 +
  15 + override func viewDidLoad() {
  16 + delegate = self
  17 + }
  18 +}
  19 +//MARK: - Contact picker delegate
  20 +extension ContactPickerViewController: CNContactPickerDelegate {
  21 + func contactPicker(_ picker: CNContactPickerViewController, didSelect contact: CNContact) {
  22 + phoneNumber = "\(contact.familyName)"
  23 +
  24 + }
  25 +}
... ...
Please register or login to post a comment