Showing
19 changed files
with
632 additions
and
65 deletions
| ... | ... | @@ -21,12 +21,21 @@ |
| 21 | 21 | 1732AC7328477BB40042C9F7 /* PickerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */; }; |
| 22 | 22 | 1738F7D82850F5D5003F1806 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1738F7D72850F5D5003F1806 /* SettingsViewController.swift */; }; |
| 23 | 23 | 1738F7DA2850F5F1003F1806 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1738F7D92850F5F1003F1806 /* SettingsView.swift */; }; |
| 24 | - 1738F7DC2850F980003F1806 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1738F7DB2850F980003F1806 /* ProfileView.swift */; }; | |
| 25 | - 1778DA3E2850FF89006619C4 /* NotificationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1778DA3D2850FF89006619C4 /* NotificationsView.swift */; }; | |
| 26 | - 1778DA402851042F006619C4 /* EditInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1778DA3F2851042F006619C4 /* EditInfoView.swift */; }; | |
| 24 | + 175DA4722852416D0075F0A9 /* Reusable+cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175DA4712852416D0075F0A9 /* Reusable+cell.swift */; }; | |
| 25 | + 175DA474285241C90075F0A9 /* SettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175DA473285241C90075F0A9 /* SettingsModel.swift */; }; | |
| 27 | 26 | 178A61D12850DDAA001509A4 /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 178A61D02850DDAA001509A4 /* HomeTableViewCell.swift */; }; |
| 27 | + 17ABE070285B80DC0006E7EC /* DisplayNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE06F285B80DC0006E7EC /* DisplayNameCell.swift */; }; | |
| 28 | + 17ABE072285B810F0006E7EC /* SettingsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE071285B810F0006E7EC /* SettingsTableViewCell.swift */; }; | |
| 29 | + 17ABE074285B81390006E7EC /* SettingsSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABE073285B81390006E7EC /* SettingsSwitchCell.swift */; }; | |
| 28 | 30 | 17ABFE58284FD20C003B6959 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABFE57284FD20C003B6959 /* HomeViewController.swift */; }; |
| 29 | 31 | 17ABFE5A284FD293003B6959 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17ABFE59284FD293003B6959 /* HomeView.swift */; }; |
| 32 | + 17B0254628587716004225AE /* ChooseApartmentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B0254528587716004225AE /* ChooseApartmentsViewController.swift */; }; | |
| 33 | + 17B0254828587726004225AE /* ChooseApartmentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B0254728587726004225AE /* ChooseApartmentsView.swift */; }; | |
| 34 | + 17CD09A42858EE39008483E2 /* ChooseApartmentsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09A32858EE39008483E2 /* ChooseApartmentsTableViewCell.swift */; }; | |
| 35 | + 17CD09AA2858F979008483E2 /* ResidentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CD09A92858F979008483E2 /* ResidentsViewController.swift */; }; | |
| 36 | + 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 */; }; | |
| 30 | 39 | 17CF9EE12844ED8F000D8077 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */; }; |
| 31 | 40 | 17CF9EE32844ED8F000D8077 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE22844ED8F000D8077 /* SceneDelegate.swift */; }; |
| 32 | 41 | 17CF9EE52844ED8F000D8077 /* VerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17CF9EE42844ED8F000D8077 /* VerificationViewController.swift */; }; |
| ... | ... | @@ -51,12 +60,21 @@ |
| 51 | 60 | 1732AC7228477BB40042C9F7 /* PickerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerViewCell.swift; sourceTree = "<group>"; }; |
| 52 | 61 | 1738F7D72850F5D5003F1806 /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; }; |
| 53 | 62 | 1738F7D92850F5F1003F1806 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; }; |
| 54 | - 1738F7DB2850F980003F1806 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; }; | |
| 55 | - 1778DA3D2850FF89006619C4 /* NotificationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsView.swift; sourceTree = "<group>"; }; | |
| 56 | - 1778DA3F2851042F006619C4 /* EditInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditInfoView.swift; sourceTree = "<group>"; }; | |
| 63 | + 175DA4712852416D0075F0A9 /* Reusable+cell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Reusable+cell.swift"; sourceTree = "<group>"; }; | |
| 64 | + 175DA473285241C90075F0A9 /* SettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsModel.swift; sourceTree = "<group>"; }; | |
| 57 | 65 | 178A61D02850DDAA001509A4 /* HomeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTableViewCell.swift; sourceTree = "<group>"; }; |
| 66 | + 17ABE06F285B80DC0006E7EC /* DisplayNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayNameCell.swift; sourceTree = "<group>"; }; | |
| 67 | + 17ABE071285B810F0006E7EC /* SettingsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTableViewCell.swift; sourceTree = "<group>"; }; | |
| 68 | + 17ABE073285B81390006E7EC /* SettingsSwitchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsSwitchCell.swift; sourceTree = "<group>"; }; | |
| 58 | 69 | 17ABFE57284FD20C003B6959 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; }; |
| 59 | 70 | 17ABFE59284FD293003B6959 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; }; |
| 71 | + 17B0254528587716004225AE /* ChooseApartmentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseApartmentsViewController.swift; sourceTree = "<group>"; }; | |
| 72 | + 17B0254728587726004225AE /* ChooseApartmentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseApartmentsView.swift; sourceTree = "<group>"; }; | |
| 73 | + 17CD09A32858EE39008483E2 /* ChooseApartmentsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChooseApartmentsTableViewCell.swift; sourceTree = "<group>"; }; | |
| 74 | + 17CD09A92858F979008483E2 /* ResidentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResidentsViewController.swift; sourceTree = "<group>"; }; | |
| 75 | + 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>"; }; | |
| 60 | 78 | 17CF9EDD2844ED8F000D8077 /* InterQR-Internship.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "InterQR-Internship.app"; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 61 | 79 | 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
| 62 | 80 | 17CF9EE22844ED8F000D8077 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; |
| ... | ... | @@ -85,6 +103,9 @@ |
| 85 | 103 | 00E581B0284F666000E779FB /* Modules */ = { |
| 86 | 104 | isa = PBXGroup; |
| 87 | 105 | children = ( |
| 106 | + 17CD09AD28591073008483E2 /* AddResidentsViewController */, | |
| 107 | + 17CD09A62858F931008483E2 /* ResidentsScreen */, | |
| 108 | + 17B0254328587434004225AE /* ChooseApartmentsScreen */, | |
| 88 | 109 | 1738F7D42850F5A1003F1806 /* SettingsScreen */, |
| 89 | 110 | 17ABFE54284FD1C8003B6959 /* HomeScreen */, |
| 90 | 111 | 00E581B1284F666600E779FB /* VerificationSceen */, |
| ... | ... | @@ -181,6 +202,7 @@ |
| 181 | 202 | 1738F7D42850F5A1003F1806 /* SettingsScreen */ = { |
| 182 | 203 | isa = PBXGroup; |
| 183 | 204 | children = ( |
| 205 | + 175DA473285241C90075F0A9 /* SettingsModel.swift */, | |
| 184 | 206 | 1738F7D62850F5C3003F1806 /* ViewController */, |
| 185 | 207 | 1738F7D52850F5B5003F1806 /* View */, |
| 186 | 208 | ); |
| ... | ... | @@ -191,9 +213,7 @@ |
| 191 | 213 | isa = PBXGroup; |
| 192 | 214 | children = ( |
| 193 | 215 | 1738F7D92850F5F1003F1806 /* SettingsView.swift */, |
| 194 | - 1738F7DB2850F980003F1806 /* ProfileView.swift */, | |
| 195 | - 1778DA3D2850FF89006619C4 /* NotificationsView.swift */, | |
| 196 | - 1778DA3F2851042F006619C4 /* EditInfoView.swift */, | |
| 216 | + 175DA46A2852406B0075F0A9 /* Cells */, | |
| 197 | 217 | ); |
| 198 | 218 | path = View; |
| 199 | 219 | sourceTree = "<group>"; |
| ... | ... | @@ -206,6 +226,16 @@ |
| 206 | 226 | path = ViewController; |
| 207 | 227 | sourceTree = "<group>"; |
| 208 | 228 | }; |
| 229 | + 175DA46A2852406B0075F0A9 /* Cells */ = { | |
| 230 | + isa = PBXGroup; | |
| 231 | + children = ( | |
| 232 | + 17ABE06F285B80DC0006E7EC /* DisplayNameCell.swift */, | |
| 233 | + 17ABE071285B810F0006E7EC /* SettingsTableViewCell.swift */, | |
| 234 | + 17ABE073285B81390006E7EC /* SettingsSwitchCell.swift */, | |
| 235 | + ); | |
| 236 | + path = Cells; | |
| 237 | + sourceTree = "<group>"; | |
| 238 | + }; | |
| 209 | 239 | 17ABFE54284FD1C8003B6959 /* HomeScreen */ = { |
| 210 | 240 | isa = PBXGroup; |
| 211 | 241 | children = ( |
| ... | ... | @@ -232,6 +262,90 @@ |
| 232 | 262 | path = VIew; |
| 233 | 263 | sourceTree = "<group>"; |
| 234 | 264 | }; |
| 265 | + 17B0254328587434004225AE /* ChooseApartmentsScreen */ = { | |
| 266 | + isa = PBXGroup; | |
| 267 | + children = ( | |
| 268 | + 17CD09A12858EE04008483E2 /* ViewController */, | |
| 269 | + 17CD09A22858EE14008483E2 /* View */, | |
| 270 | + ); | |
| 271 | + path = ChooseApartmentsScreen; | |
| 272 | + sourceTree = "<group>"; | |
| 273 | + }; | |
| 274 | + 17CD09A12858EE04008483E2 /* ViewController */ = { | |
| 275 | + isa = PBXGroup; | |
| 276 | + children = ( | |
| 277 | + 17B0254528587716004225AE /* ChooseApartmentsViewController.swift */, | |
| 278 | + ); | |
| 279 | + path = ViewController; | |
| 280 | + sourceTree = "<group>"; | |
| 281 | + }; | |
| 282 | + 17CD09A22858EE14008483E2 /* View */ = { | |
| 283 | + isa = PBXGroup; | |
| 284 | + children = ( | |
| 285 | + 17B0254728587726004225AE /* ChooseApartmentsView.swift */, | |
| 286 | + 17CD09A52858EE4B008483E2 /* Cell */, | |
| 287 | + ); | |
| 288 | + path = View; | |
| 289 | + sourceTree = "<group>"; | |
| 290 | + }; | |
| 291 | + 17CD09A52858EE4B008483E2 /* Cell */ = { | |
| 292 | + isa = PBXGroup; | |
| 293 | + children = ( | |
| 294 | + 17CD09A32858EE39008483E2 /* ChooseApartmentsTableViewCell.swift */, | |
| 295 | + ); | |
| 296 | + path = Cell; | |
| 297 | + sourceTree = "<group>"; | |
| 298 | + }; | |
| 299 | + 17CD09A62858F931008483E2 /* ResidentsScreen */ = { | |
| 300 | + isa = PBXGroup; | |
| 301 | + children = ( | |
| 302 | + 17CD09A72858F955008483E2 /* ViewController */, | |
| 303 | + 17CD09A82858F962008483E2 /* View */, | |
| 304 | + ); | |
| 305 | + path = ResidentsScreen; | |
| 306 | + sourceTree = "<group>"; | |
| 307 | + }; | |
| 308 | + 17CD09A72858F955008483E2 /* ViewController */ = { | |
| 309 | + isa = PBXGroup; | |
| 310 | + children = ( | |
| 311 | + 17CD09A92858F979008483E2 /* ResidentsViewController.swift */, | |
| 312 | + ); | |
| 313 | + path = ViewController; | |
| 314 | + sourceTree = "<group>"; | |
| 315 | + }; | |
| 316 | + 17CD09A82858F962008483E2 /* View */ = { | |
| 317 | + isa = PBXGroup; | |
| 318 | + children = ( | |
| 319 | + 17CD09AB2858F9B0008483E2 /* ResidentsView.swift */, | |
| 320 | + ); | |
| 321 | + path = View; | |
| 322 | + sourceTree = "<group>"; | |
| 323 | + }; | |
| 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 | + }; | |
| 235 | 349 | 17CF9ED42844ED8F000D8077 = { |
| 236 | 350 | isa = PBXGroup; |
| 237 | 351 | children = ( |
| ... | ... | @@ -255,6 +369,7 @@ |
| 255 | 369 | 17CF9EDF2844ED8F000D8077 /* InterQR-Internship */ = { |
| 256 | 370 | isa = PBXGroup; |
| 257 | 371 | children = ( |
| 372 | + 175DA4712852416D0075F0A9 /* Reusable+cell.swift */, | |
| 258 | 373 | 00E581B7284F71A700E779FB /* Common */, |
| 259 | 374 | 00E581B0284F666000E779FB /* Modules */, |
| 260 | 375 | 17CF9EE02844ED8F000D8077 /* AppDelegate.swift */, |
| ... | ... | @@ -420,27 +535,36 @@ |
| 420 | 535 | isa = PBXSourcesBuildPhase; |
| 421 | 536 | buildActionMask = 2147483647; |
| 422 | 537 | files = ( |
| 538 | + 17CD09B12859110A008483E2 /* AddResidentsViewController.swift in Sources */, | |
| 539 | + 17ABE070285B80DC0006E7EC /* DisplayNameCell.swift in Sources */, | |
| 423 | 540 | 1729E22128465DA9006C7C29 /* PhonePickerModel.swift in Sources */, |
| 424 | 541 | 17058D52284A4F150078DD82 /* CodeVerificationViewController.swift in Sources */, |
| 425 | - 1778DA402851042F006619C4 /* EditInfoView.swift in Sources */, | |
| 426 | 542 | 1732AC71284769B50042C9F7 /* TextFieldWithPadding.swift in Sources */, |
| 427 | 543 | 17ABFE5A284FD293003B6959 /* HomeView.swift in Sources */, |
| 428 | 544 | 1732AC7328477BB40042C9F7 /* PickerViewCell.swift in Sources */, |
| 429 | 545 | 1729E21F28465595006C7C29 /* PhoneNumberView.swift in Sources */, |
| 546 | + 17ABE072285B810F0006E7EC /* SettingsTableViewCell.swift in Sources */, | |
| 547 | + 17CD09AC2858F9B0008483E2 /* ResidentsView.swift in Sources */, | |
| 548 | + 17B0254628587716004225AE /* ChooseApartmentsViewController.swift in Sources */, | |
| 549 | + 175DA4722852416D0075F0A9 /* Reusable+cell.swift in Sources */, | |
| 430 | 550 | 17ABFE58284FD20C003B6959 /* HomeViewController.swift in Sources */, |
| 431 | 551 | 17CF9EE52844ED8F000D8077 /* VerificationViewController.swift in Sources */, |
| 432 | 552 | 17058D54284A4F670078DD82 /* CodeVerificationView.swift in Sources */, |
| 553 | + 175DA474285241C90075F0A9 /* SettingsModel.swift in Sources */, | |
| 433 | 554 | 17CF9EE12844ED8F000D8077 /* AppDelegate.swift in Sources */, |
| 555 | + 17CD09A42858EE39008483E2 /* ChooseApartmentsTableViewCell.swift in Sources */, | |
| 434 | 556 | 1729E21D28465163006C7C29 /* PhoneService.swift in Sources */, |
| 435 | - 1778DA3E2850FF89006619C4 /* NotificationsView.swift in Sources */, | |
| 436 | 557 | 17CF9EE32844ED8F000D8077 /* SceneDelegate.swift in Sources */, |
| 437 | 558 | 1738F7D82850F5D5003F1806 /* SettingsViewController.swift in Sources */, |
| 438 | 559 | 1738F7DA2850F5F1003F1806 /* SettingsView.swift in Sources */, |
| 560 | + 17CD09AA2858F979008483E2 /* ResidentsViewController.swift in Sources */, | |
| 439 | 561 | 00E581BB284F71CD00E779FB /* Checkbox.swift in Sources */, |
| 440 | 562 | 17287C602848AD8D00AA7113 /* Fonts + Extension.swift in Sources */, |
| 441 | - 1738F7DC2850F980003F1806 /* ProfileView.swift in Sources */, | |
| 563 | + 17CD09B3285911C8008483E2 /* AddResidentsView.swift in Sources */, | |
| 442 | 564 | 178A61D12850DDAA001509A4 /* HomeTableViewCell.swift in Sources */, |
| 565 | + 17ABE074285B81390006E7EC /* SettingsSwitchCell.swift in Sources */, | |
| 443 | 566 | 17CF9EF72844EF8B000D8077 /* VerificationView.swift in Sources */, |
| 567 | + 17B0254828587726004225AE /* ChooseApartmentsView.swift in Sources */, | |
| 444 | 568 | ); |
| 445 | 569 | runOnlyForDeploymentPostprocessing = 0; |
| 446 | 570 | }; | ... | ... |
| ... | ... | @@ -3,4 +3,22 @@ |
| 3 | 3 | uuid = "CB908779-2558-4E0D-A4CA-2068778D434A" |
| 4 | 4 | type = "0" |
| 5 | 5 | version = "2.0"> |
| 6 | + <Breakpoints> | |
| 7 | + <BreakpointProxy | |
| 8 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
| 9 | + <BreakpointContent | |
| 10 | + uuid = "BF66D3C2-0ECB-4FE6-BC84-3A1154618C5F" | |
| 11 | + shouldBeEnabled = "No" | |
| 12 | + ignoreCount = "0" | |
| 13 | + continueAfterRunningActions = "No" | |
| 14 | + filePath = "InterQR-Internship/Modules/AddResidentsViewController/View/AddResidentsView.swift" | |
| 15 | + startingColumnNumber = "9223372036854775807" | |
| 16 | + endingColumnNumber = "9223372036854775807" | |
| 17 | + startingLineNumber = "224" | |
| 18 | + endingLineNumber = "224" | |
| 19 | + landmarkName = "layoutSubviews()" | |
| 20 | + landmarkType = "7"> | |
| 21 | + </BreakpointContent> | |
| 22 | + </BreakpointProxy> | |
| 23 | + </Breakpoints> | |
| 6 | 24 | </Bucket> | ... | ... |
| ... | ... | @@ -5,4 +5,222 @@ |
| 5 | 5 | // Created by Дмитрий Тимофеев on 14.06.2022. |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | -import Foundation | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +class AddResidentsView: UIView { | |
| 11 | + var transparentView: UIView = { | |
| 12 | + var obj = UIView() | |
| 13 | + obj.backgroundColor = .black | |
| 14 | + obj.alpha = 0.5 | |
| 15 | + return obj | |
| 16 | + }() | |
| 17 | + | |
| 18 | + var containerView: UIView = { | |
| 19 | + var obj = UIView() | |
| 20 | + obj.clipsToBounds = true | |
| 21 | + obj.layer.cornerRadius = 15 | |
| 22 | + obj.backgroundColor = .white | |
| 23 | + return obj | |
| 24 | + }() | |
| 25 | + | |
| 26 | + var addResidentLabeL: UILabel = { | |
| 27 | + var obj = UILabel() | |
| 28 | + obj.text = "Add resident" | |
| 29 | + obj.textColor = UIColor(red: 0.196, green: 0.216, blue: 0.333, alpha: 1) | |
| 30 | + obj.font = .skModernist(type: .bold, ofSize: 24) | |
| 31 | + return obj | |
| 32 | + }() | |
| 33 | + | |
| 34 | + var closeButton: UIButton = { | |
| 35 | + var obj = UIButton() | |
| 36 | + obj.layer.cornerRadius = 13 | |
| 37 | + obj.layer.borderWidth = 1 | |
| 38 | + obj.layer.borderColor = UIColor(red: 0.882, green: 0.91, blue: 0.91, alpha: 1).cgColor | |
| 39 | + obj.setImage(UIImage(named: "Close"), for: .normal) | |
| 40 | + return obj | |
| 41 | + }() | |
| 42 | + | |
| 43 | + var dividingLineView: UIView = { | |
| 44 | + var view = UIView() | |
| 45 | + view.backgroundColor = UIColor(red: 246/255, green: 246/255, blue: 246/255, alpha: 1) | |
| 46 | + return view | |
| 47 | + }() | |
| 48 | + | |
| 49 | + var residentNameLabel: UILabel = { | |
| 50 | + var obj = UILabel() | |
| 51 | + obj.text = "Resident name" | |
| 52 | + obj.font = .skModernist(type: .bold, ofSize: 14) | |
| 53 | + obj.textColor = UIColor(red: 0.196, green: 0.216, blue: 0.333, alpha: 1) | |
| 54 | + return obj | |
| 55 | + }() | |
| 56 | + | |
| 57 | + var nameTextField: UITextField = { | |
| 58 | + var obj = UITextField() | |
| 59 | + obj.backgroundColor = UIColor(red: 0.954, green: 0.954, blue: 0.954, alpha: 1) | |
| 60 | + obj.textAlignment = .left | |
| 61 | + obj.layer.cornerRadius = 15 | |
| 62 | + return obj | |
| 63 | + }() | |
| 64 | + | |
| 65 | + var mobileNumberLabel: UILabel = { | |
| 66 | + var obj = UILabel() | |
| 67 | + obj.text = "Mobile number" | |
| 68 | + obj.font = .skModernist(type: .bold, ofSize: 14) | |
| 69 | + obj.textColor = UIColor(red: 0.196, green: 0.216, blue: 0.333, alpha: 1) | |
| 70 | + return obj | |
| 71 | + }() | |
| 72 | + | |
| 73 | + var mobileNumberTextField: UITextField = { | |
| 74 | + var obj = UITextField() | |
| 75 | + obj.backgroundColor = UIColor(red: 0.954, green: 0.954, blue: 0.954, alpha: 1) | |
| 76 | + obj.textAlignment = .left | |
| 77 | + obj.layer.cornerRadius = 15 | |
| 78 | + return obj | |
| 79 | + }() | |
| 80 | + | |
| 81 | + var managerButton: UIButton = { | |
| 82 | + var obj = UIButton() | |
| 83 | +// obj.setImage(<#T##image: UIImage?##UIImage?#>, for: <#T##UIControl.State#>) | |
| 84 | + return obj | |
| 85 | + }() | |
| 86 | + | |
| 87 | + var hiddenButton: UIButton = { | |
| 88 | + var obj = UIButton() | |
| 89 | + return obj | |
| 90 | + }() | |
| 91 | + | |
| 92 | + var heartButton: UIButton = { | |
| 93 | + var obj = UIButton() | |
| 94 | + obj.setImage(UIImage(named: "Heart"), for: .normal) | |
| 95 | + obj.setImage(UIImage(named: "HeartRed"), for: .selected) | |
| 96 | + return obj | |
| 97 | + }() | |
| 98 | + | |
| 99 | + var gradientBG: CAGradientLayer = { | |
| 100 | + let obj = CAGradientLayer() | |
| 101 | + var leftColor = UIColor(red: 0/255, green: 68/255, blue: 139/255, alpha: 1).cgColor | |
| 102 | + var rightColor = UIColor(red: 0/255, green: 122/255, blue: 191/255, alpha: 1).cgColor | |
| 103 | + obj.colors = [leftColor, rightColor] | |
| 104 | + obj.startPoint = CGPoint(x: 0, y: 0.5) | |
| 105 | + obj.endPoint = CGPoint(x: 1, y: 0.5) | |
| 106 | + return obj | |
| 107 | + }() | |
| 108 | + | |
| 109 | + var addResidentButton: UIButton = { | |
| 110 | + var obj = UIButton() | |
| 111 | + obj.setTitle("Add resident", for: .normal) | |
| 112 | + obj.setTitleColor(UIColor(red: 1, green: 1, blue: 1, alpha: 1), for: .normal) | |
| 113 | + obj.titleLabel?.font = .skModernist(type: .bold, ofSize: 16) | |
| 114 | + obj.setTitleColor(.cyan, for: .normal) | |
| 115 | + obj.clipsToBounds = true | |
| 116 | + obj.layer.masksToBounds = true | |
| 117 | + return obj | |
| 118 | + }() | |
| 119 | + | |
| 120 | + override init(frame: CGRect) { | |
| 121 | + super.init(frame: frame) | |
| 122 | + layout() | |
| 123 | + backgroundColor = .clear | |
| 124 | + } | |
| 125 | + | |
| 126 | + required init?(coder: NSCoder) { | |
| 127 | + fatalError("init(coder:) has not been implemented") | |
| 128 | + } | |
| 129 | + | |
| 130 | + func layout() { | |
| 131 | + addResidentButton.layer.insertSublayer(gradientBG, at: 0) | |
| 132 | + | |
| 133 | + addSubview(transparentView) | |
| 134 | + | |
| 135 | + addSubview(containerView) | |
| 136 | + containerView.addSubview(addResidentLabeL) | |
| 137 | + containerView.addSubview(closeButton) | |
| 138 | + containerView.addSubview(dividingLineView) | |
| 139 | + containerView.addSubview(residentNameLabel) | |
| 140 | + containerView.addSubview(nameTextField) | |
| 141 | + containerView.addSubview(mobileNumberLabel) | |
| 142 | + containerView.addSubview(mobileNumberTextField) | |
| 143 | + containerView.addSubview(managerButton) | |
| 144 | + containerView.addSubview(hiddenButton) | |
| 145 | + containerView.addSubview(heartButton) | |
| 146 | + containerView.addSubview(addResidentButton) | |
| 147 | + | |
| 148 | + transparentView.snp.makeConstraints { | |
| 149 | + $0.leading.top.trailing.bottom.equalToSuperview() | |
| 150 | + } | |
| 151 | + | |
| 152 | + containerView.snp.makeConstraints { | |
| 153 | + $0.leading.trailing.equalToSuperview().inset(25) | |
| 154 | +// $0.top.equalToSuperview().offset(174) | |
| 155 | +// $0.bottom.equalToSuperview().offset(-201) | |
| 156 | + $0.centerY.equalToSuperview() | |
| 157 | + } | |
| 158 | + | |
| 159 | + addResidentLabeL.snp.makeConstraints { | |
| 160 | + $0.top.equalToSuperview().offset(34) | |
| 161 | + $0.leading.equalToSuperview().offset(28) | |
| 162 | + } | |
| 163 | + | |
| 164 | + closeButton.snp.makeConstraints { | |
| 165 | + $0.centerY.equalTo(addResidentLabeL) | |
| 166 | + $0.trailing.equalToSuperview().offset(-30) | |
| 167 | + $0.height.width.equalTo(45) | |
| 168 | + } | |
| 169 | + | |
| 170 | + dividingLineView.snp.makeConstraints { | |
| 171 | + $0.trailing.leading.equalToSuperview() | |
| 172 | + $0.height.equalTo(1) | |
| 173 | + $0.top.equalTo(addResidentLabeL.snp.bottom).offset(34) | |
| 174 | + } | |
| 175 | + | |
| 176 | + residentNameLabel.snp.makeConstraints { | |
| 177 | + $0.top.equalTo(dividingLineView.snp.bottom).offset(24) | |
| 178 | + $0.leading.equalToSuperview().offset(44) | |
| 179 | + | |
| 180 | + } | |
| 181 | + | |
| 182 | + nameTextField.snp.makeConstraints { | |
| 183 | + $0.leading.trailing.equalToSuperview().inset(30) | |
| 184 | + $0.top.equalTo(residentNameLabel.snp.bottom).offset(10) | |
| 185 | + $0.height.equalTo(47) | |
| 186 | + } | |
| 187 | + | |
| 188 | + mobileNumberLabel.snp.makeConstraints { | |
| 189 | + $0.leading.equalTo(residentNameLabel.snp.leading) | |
| 190 | + $0.top.equalTo(nameTextField.snp.bottom).offset(15) | |
| 191 | + | |
| 192 | + } | |
| 193 | + | |
| 194 | + mobileNumberTextField.snp.makeConstraints { | |
| 195 | + $0.leading.trailing.equalToSuperview().inset(30) | |
| 196 | + $0.top.equalTo(mobileNumberLabel.snp.bottom).offset(10) | |
| 197 | + $0.height.equalTo(47) | |
| 198 | + } | |
| 199 | + | |
| 200 | + managerButton.snp.makeConstraints { | |
| 201 | + $0.leading.equalToSuperview().offset(29) | |
| 202 | + $0.top.equalTo(mobileNumberTextField.snp.bottom).offset(30) | |
| 203 | + } | |
| 204 | + | |
| 205 | + hiddenButton.snp.makeConstraints { | |
| 206 | + $0.top.equalTo(managerButton) | |
| 207 | + $0.leading.equalTo(managerButton.snp.trailing).offset(24) | |
| 208 | + } | |
| 209 | + | |
| 210 | + heartButton.snp.makeConstraints { | |
| 211 | + $0.top.equalTo(managerButton) | |
| 212 | + $0.trailing.equalToSuperview().offset(-32.5) | |
| 213 | + } | |
| 214 | + | |
| 215 | + addResidentButton.snp.makeConstraints { | |
| 216 | + $0.top.equalTo(managerButton.snp.bottom).offset(43) | |
| 217 | + $0.leading.trailing.bottom.equalToSuperview() | |
| 218 | + $0.height.equalTo(45) | |
| 219 | + } | |
| 220 | + } | |
| 221 | + | |
| 222 | + override func layoutSubviews() { | |
| 223 | + super.layoutSubviews() | |
| 224 | + gradientBG.frame = addResidentButton.bounds | |
| 225 | + } | |
| 226 | +} | ... | ... |
| ... | ... | @@ -9,7 +9,12 @@ import UIKit |
| 9 | 9 | |
| 10 | 10 | class AddResidentsViewController: UIViewController { |
| 11 | 11 | |
| 12 | + var mainView = AddResidentsView() | |
| 13 | + | |
| 14 | + override func loadView() { | |
| 15 | + view = mainView | |
| 16 | + } | |
| 17 | + | |
| 12 | 18 | override func viewDidLoad() { |
| 13 | - view.backgroundColor = .red | |
| 14 | 19 | } |
| 15 | 20 | } | ... | ... |
| ... | ... | @@ -48,10 +48,11 @@ class ChooseApartmentsTableViewCell: UITableViewCell { |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | func layout() { |
| 51 | - addSubview(apartmanImage) | |
| 52 | - addSubview(clientNameLabel) | |
| 53 | - addSubview(adressLabel) | |
| 54 | - addSubview(nextPointerImage) | |
| 51 | + selectionStyle = .none | |
| 52 | + contentView.addSubview(apartmanImage) | |
| 53 | + contentView.addSubview(clientNameLabel) | |
| 54 | + contentView.addSubview(adressLabel) | |
| 55 | + contentView.addSubview(nextPointerImage) | |
| 55 | 56 | |
| 56 | 57 | apartmanImage.snp.makeConstraints { |
| 57 | 58 | $0.top.equalToSuperview().offset(8) | ... | ... |
| ... | ... | @@ -21,10 +21,15 @@ class ChooseApartmentsViewController: UIViewController { |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | func initViewController() { |
| 24 | + mainView.backButton.addTarget(self, action: #selector(backToSettingsVC), for: .touchUpInside) | |
| 24 | 25 | mainView.tableView.delegate = self |
| 25 | 26 | mainView.tableView.dataSource = self |
| 26 | 27 | mainView.tableView.register(ChooseApartmentsTableViewCell.self, forCellReuseIdentifier: ChooseApartmentsTableViewCell.id) |
| 27 | 28 | } |
| 29 | + | |
| 30 | + @objc func backToSettingsVC() { | |
| 31 | + navigationController?.popViewController(animated: true) | |
| 32 | + } | |
| 28 | 33 | } |
| 29 | 34 | extension ChooseApartmentsViewController: UITableViewDelegate, UITableViewDataSource { |
| 30 | 35 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| ... | ... | @@ -40,8 +45,11 @@ extension ChooseApartmentsViewController: UITableViewDelegate, UITableViewDataSo |
| 40 | 45 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| 41 | 46 | 87 |
| 42 | 47 | } |
| 48 | + | |
| 43 | 49 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 50 | + let vc = ResidentsViewController() | |
| 51 | + navigationController?.pushViewController(vc, animated: true) | |
| 52 | + print("❌") | |
| 44 | 53 | |
| 45 | 54 | } |
| 46 | - | |
| 47 | 55 | } | ... | ... |
| ... | ... | @@ -30,7 +30,6 @@ class HomeViewController: UIViewController { |
| 30 | 30 | extension HomeViewController { |
| 31 | 31 | |
| 32 | 32 | @objc func didShowSettingsVC() { |
| 33 | - print("❌") | |
| 34 | 33 | let vc = SettingsViewController() |
| 35 | 34 | navigationController?.pushViewController(vc, animated: true) |
| 36 | 35 | } |
| ... | ... | @@ -53,7 +52,7 @@ extension HomeViewController: UITableViewDelegate, UITableViewDataSource { |
| 53 | 52 | } |
| 54 | 53 | |
| 55 | 54 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 56 | - | |
| 55 | + print("✅") | |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 | ... | ... |
| ... | ... | @@ -5,4 +5,125 @@ |
| 5 | 5 | // Created by Дмитрий Тимофеев on 14.06.2022. |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | -import Foundation | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +class ResidentsView: UIView { | |
| 11 | + | |
| 12 | + var backButton: UIButton = { | |
| 13 | + var obj = UIButton() | |
| 14 | + obj.setImage(UIImage(named: "BackPointer"), for: .normal) | |
| 15 | + obj.backgroundColor = .white | |
| 16 | + obj.layer.borderColor = UIColor(red: 224/255, green: 231/255, blue: 232/255, alpha: 1).cgColor | |
| 17 | + obj.layer.cornerRadius = 13 | |
| 18 | + obj.layer.borderWidth = 1 | |
| 19 | + return obj | |
| 20 | + }() | |
| 21 | + | |
| 22 | + var logoImage: UIImageView = { | |
| 23 | + var obj = UIImageView() | |
| 24 | + obj.image = UIImage(named: "InterQR") | |
| 25 | + return obj | |
| 26 | + }() | |
| 27 | + | |
| 28 | + let apartNameLabel: UILabel = { | |
| 29 | + var obj = UILabel() | |
| 30 | + obj.font = .skModernist(type: .bold, ofSize: 35) | |
| 31 | + obj.text = "My apart name" | |
| 32 | + return obj | |
| 33 | + }() | |
| 34 | + | |
| 35 | + var dividingLineView: UIView = { | |
| 36 | + var view = UIView() | |
| 37 | + view.backgroundColor = UIColor(red: 246/255, green: 246/255, blue: 246/255, alpha: 1) | |
| 38 | + return view | |
| 39 | + }() | |
| 40 | + | |
| 41 | + var residentsLabel: UILabel = { | |
| 42 | + var obj = UILabel() | |
| 43 | + obj.font = .skModernist(type: .bold, ofSize: 20) | |
| 44 | + obj.text = "Residents" | |
| 45 | + return obj | |
| 46 | + }() | |
| 47 | + | |
| 48 | + var addResidentsButton: UIButton = { | |
| 49 | + var obj = UIButton() | |
| 50 | + obj.layer.borderWidth = 1 | |
| 51 | + obj.layer.borderColor = UIColor(red: 0.882, green: 0.91, blue: 0.91, alpha: 1).cgColor | |
| 52 | + obj.layer.cornerRadius = 13 | |
| 53 | + obj.setImage(UIImage(named: "Edit"), for: .normal) | |
| 54 | + return obj | |
| 55 | + }() | |
| 56 | + | |
| 57 | + let tableView: UITableView = { | |
| 58 | + let obj = UITableView() | |
| 59 | + obj.allowsSelection = false | |
| 60 | + obj.showsVerticalScrollIndicator = false | |
| 61 | + obj.separatorStyle = .none | |
| 62 | + return obj | |
| 63 | + }() | |
| 64 | + | |
| 65 | + let addResidentView: AddResidentsView = { | |
| 66 | + var obj = AddResidentsView() | |
| 67 | + obj.isHidden = true | |
| 68 | + return obj | |
| 69 | + }() | |
| 70 | + | |
| 71 | + | |
| 72 | + override init(frame: CGRect) { | |
| 73 | + super.init(frame: frame) | |
| 74 | + backgroundColor = .white | |
| 75 | + layout() | |
| 76 | + } | |
| 77 | + | |
| 78 | + required init?(coder: NSCoder) { | |
| 79 | + fatalError("init(coder:) has not been implemented") | |
| 80 | + } | |
| 81 | + | |
| 82 | + func layout() { | |
| 83 | + | |
| 84 | + addSubview(backButton) | |
| 85 | + addSubview(logoImage) | |
| 86 | + addSubview(apartNameLabel) | |
| 87 | + addSubview(dividingLineView) | |
| 88 | + addSubview(residentsLabel) | |
| 89 | + addSubview(addResidentsButton) | |
| 90 | + addSubview(tableView) | |
| 91 | + addSubview(addResidentView) | |
| 92 | + | |
| 93 | + backButton.snp.makeConstraints { | |
| 94 | + $0.top.equalTo(snp.top).offset(66) | |
| 95 | + $0.leading.equalTo(snp.leading).offset(25) | |
| 96 | + $0.height.width.equalTo(45) | |
| 97 | + } | |
| 98 | + logoImage.snp.makeConstraints { | |
| 99 | + $0.leading.equalTo(backButton.snp.trailing).offset(20) | |
| 100 | + $0.top.equalTo(snp.top).offset(79) | |
| 101 | + } | |
| 102 | + apartNameLabel.snp.makeConstraints { | |
| 103 | + $0.leading.equalTo(backButton.snp.leading) | |
| 104 | + $0.top.equalTo(backButton.snp.bottom).offset(46) | |
| 105 | + } | |
| 106 | + dividingLineView.snp.makeConstraints { | |
| 107 | + $0.leading.trailing.equalToSuperview() | |
| 108 | + $0.height.equalTo(1) | |
| 109 | + $0.top.equalTo(apartNameLabel.snp.bottom).offset(42) | |
| 110 | + } | |
| 111 | + residentsLabel.snp.makeConstraints { | |
| 112 | + $0.leading.equalToSuperview().offset(24) | |
| 113 | + $0.top.equalTo(dividingLineView.snp.bottom).offset(43) | |
| 114 | + } | |
| 115 | + addResidentsButton.snp.makeConstraints { | |
| 116 | + $0.height.width.equalTo(45) | |
| 117 | + $0.top.equalTo(dividingLineView.snp.bottom).offset(32) | |
| 118 | + $0.trailing.equalToSuperview().offset(-29) | |
| 119 | + } | |
| 120 | + tableView.snp.makeConstraints { | |
| 121 | + $0.top.equalTo(residentsLabel.snp.bottom).offset(30) | |
| 122 | + $0.leading.trailing.equalToSuperview() | |
| 123 | + $0.bottom.equalToSuperview() | |
| 124 | + } | |
| 125 | + addResidentView.snp.makeConstraints { | |
| 126 | + $0.top.trailing.leading.bottom.equalToSuperview() | |
| 127 | + } | |
| 128 | + } | |
| 129 | +} | ... | ... |
| ... | ... | @@ -5,4 +5,32 @@ |
| 5 | 5 | // Created by Дмитрий Тимофеев on 14.06.2022. |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | -import Foundation | |
| 8 | +import UIKit | |
| 9 | + | |
| 10 | +class ResidentsViewController: UIViewController { | |
| 11 | + | |
| 12 | + var mainView = ResidentsView() | |
| 13 | + | |
| 14 | + override func loadView() { | |
| 15 | + view = mainView | |
| 16 | + } | |
| 17 | + | |
| 18 | + override func viewDidLoad() { | |
| 19 | + mainView.backButton.addTarget(self, action: #selector(didShowChooseApartVC), for: .touchUpInside) | |
| 20 | + mainView.addResidentsButton.addTarget(self, action: #selector(willShowAddResidentVC), for: .touchUpInside) | |
| 21 | + } | |
| 22 | + | |
| 23 | + @objc func didShowChooseApartVC() { | |
| 24 | + navigationController?.popViewController(animated: true) | |
| 25 | + } | |
| 26 | + | |
| 27 | + @objc func willShowAddResidentVC() { | |
| 28 | +// UIView.animate(withDuration: 0.5) { | |
| 29 | +// self.mainView.addResidentView.isHidden = false | |
| 30 | +// } | |
| 31 | + let vc = AddResidentsViewController() | |
| 32 | + vc.modalPresentationStyle = .overCurrentContext | |
| 33 | + vc.modalTransitionStyle = .crossDissolve | |
| 34 | + present(vc, animated: true) | |
| 35 | + } | |
| 36 | +} | ... | ... |
| ... | ... | @@ -30,24 +30,18 @@ class SettingsView: UIView { |
| 30 | 30 | return obj |
| 31 | 31 | }() |
| 32 | 32 | |
| 33 | - var settingsLabel: UILabel = { | |
| 33 | + let settingsLabel: UILabel = { | |
| 34 | 34 | var obj = UILabel() |
| 35 | 35 | obj.font = .skModernist(type: .bold, ofSize: 35) |
| 36 | 36 | obj.text = "Settings" |
| 37 | 37 | return obj |
| 38 | 38 | }() |
| 39 | - var profileView: ProfileView = { | |
| 40 | - var obj = ProfileView() | |
| 41 | - return obj | |
| 42 | - }() | |
| 43 | - var notificationsView: NotificationsView = { | |
| 44 | - var obj = NotificationsView() | |
| 45 | - return obj | |
| 46 | - }() | |
| 47 | - var editInfo: EditInfoView = { | |
| 48 | - var obj = EditInfoView() | |
| 39 | + | |
| 40 | + let settingsTableView: UITableView = { | |
| 41 | + let obj = UITableView() | |
| 49 | 42 | return obj |
| 50 | 43 | }() |
| 44 | + | |
| 51 | 45 | var logoutButton: UIButton = { |
| 52 | 46 | var obj = UIButton() |
| 53 | 47 | obj.backgroundColor = UIColor(red: 1, green: 0, blue: 0.18, alpha: 0.07) |
| ... | ... | @@ -72,9 +66,7 @@ class SettingsView: UIView { |
| 72 | 66 | addSubview(logoImage) |
| 73 | 67 | addSubview(gearImage) |
| 74 | 68 | addSubview(settingsLabel) |
| 75 | - addSubview(profileView) | |
| 76 | - addSubview(notificationsView) | |
| 77 | - addSubview(editInfo) | |
| 69 | + addSubview(settingsTableView) | |
| 78 | 70 | addSubview(logoutButton) |
| 79 | 71 | |
| 80 | 72 | backButton.snp.makeConstraints { |
| ... | ... | @@ -94,27 +86,19 @@ class SettingsView: UIView { |
| 94 | 86 | $0.leading.equalTo(backButton.snp.leading) |
| 95 | 87 | $0.top.equalTo(backButton.snp.bottom).offset(46) |
| 96 | 88 | } |
| 97 | - profileView.snp.makeConstraints { | |
| 98 | - $0.top.equalTo(settingsLabel.snp.bottom).offset(85) | |
| 99 | - $0.leading.equalTo(snp.leading) | |
| 100 | - $0.trailing.equalTo(snp.trailing) | |
| 101 | - $0.height.equalTo(140) | |
| 102 | - } | |
| 103 | - notificationsView.snp.makeConstraints { | |
| 104 | - $0.top.equalTo(profileView.snp.bottom) | |
| 105 | - $0.leading.trailing.equalToSuperview() | |
| 106 | - $0.height.equalTo(140) | |
| 107 | - } | |
| 108 | - editInfo.snp.makeConstraints { | |
| 109 | - $0.top.equalTo(notificationsView.snp.bottom) | |
| 110 | - $0.leading.trailing.equalToSuperview() | |
| 111 | - $0.height.equalTo(102) | |
| 89 | + | |
| 90 | + settingsTableView.snp.makeConstraints { make in | |
| 91 | + make.leading.trailing.equalToSuperview() | |
| 92 | + make.top.equalTo(settingsLabel.snp.bottom).offset(85) | |
| 112 | 93 | } |
| 94 | + | |
| 113 | 95 | logoutButton.snp.makeConstraints { |
| 114 | - $0.top.equalTo(editInfo.snp.bottom).offset(42) | |
| 96 | + $0.top.equalTo(settingsTableView.snp.bottom).offset(42) | |
| 115 | 97 | $0.leading.equalTo(snp.leading).offset(25) |
| 116 | 98 | $0.trailing.equalTo(snp.trailing).offset(-26) |
| 117 | 99 | $0.height.equalTo(56) |
| 100 | + $0.bottom.equalToSuperview().offset(-51) | |
| 118 | 101 | } |
| 119 | 102 | } |
| 120 | 103 | } |
| 104 | + | ... | ... |
| ... | ... | @@ -11,12 +11,26 @@ class SettingsViewController: UIViewController { |
| 11 | 11 | |
| 12 | 12 | var mainView = SettingsView() |
| 13 | 13 | |
| 14 | + let settingsModel = SettingsModel.allCases | |
| 15 | + | |
| 14 | 16 | override func loadView() { |
| 15 | 17 | view = mainView |
| 16 | 18 | } |
| 17 | 19 | override func viewDidLoad() { |
| 20 | + super.viewDidLoad() | |
| 21 | + initViewController() | |
| 22 | + } | |
| 23 | + | |
| 24 | + private func initViewController() { | |
| 18 | 25 | mainView.backButton.addTarget(self, action: #selector(didShowHomeVC), for: .touchUpInside) |
| 19 | 26 | mainView.logoutButton.addTarget(self, action: #selector(didLogoutAndShowVerificationVC), for: .touchUpInside) |
| 27 | + | |
| 28 | + mainView.settingsTableView.registerReusableCell(DisplayNameCell.self) | |
| 29 | + mainView.settingsTableView.registerReusableCell(SettingsSwitchCell.self) | |
| 30 | + mainView.settingsTableView.registerReusableCell(SettingsTableViewCell.self) | |
| 31 | + | |
| 32 | + mainView.settingsTableView.delegate = self | |
| 33 | + mainView.settingsTableView.dataSource = self | |
| 20 | 34 | } |
| 21 | 35 | } |
| 22 | 36 | |
| ... | ... | @@ -31,3 +45,45 @@ extension SettingsViewController { |
| 31 | 45 | navigationController?.pushViewController(vc, animated: true) |
| 32 | 46 | } |
| 33 | 47 | } |
| 48 | + | |
| 49 | +//MARK: tableView delegate and datasource | |
| 50 | +extension SettingsViewController: UITableViewDelegate, UITableViewDataSource { | |
| 51 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| 52 | + return settingsModel.count | |
| 53 | + } | |
| 54 | + | |
| 55 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| 56 | + let row = indexPath.row | |
| 57 | + let model: SettingsModel = settingsModel[row] | |
| 58 | + | |
| 59 | + switch model { | |
| 60 | + case .displayName: | |
| 61 | + let cell: DisplayNameCell = tableView.dequeueReusableCell(for: indexPath) | |
| 62 | + cell.titleLabel.text = model.getTitle() | |
| 63 | + cell.descriptionLabel.text = model.getDescription() | |
| 64 | + cell.settingsIcon.image = model.getIcon() | |
| 65 | + return cell | |
| 66 | + case .doNotDisturb, .ringtone: | |
| 67 | + let cell: SettingsSwitchCell = tableView.dequeueReusableCell(for: indexPath) | |
| 68 | + cell.titleLabel.text = model.getTitle() | |
| 69 | + cell.descriptionLabel.text = model.getDescription() | |
| 70 | + cell.settingsIcon.image = model.getIcon() | |
| 71 | + // cell.delegate = self | |
| 72 | + return cell | |
| 73 | + case .editResidents, .widgetLock: | |
| 74 | + let cell: SettingsTableViewCell = tableView.dequeueReusableCell(for: indexPath) | |
| 75 | + cell.titleLabel.text = model.getTitle() | |
| 76 | + cell.descriptionLabel.text = model.getDescription() | |
| 77 | + cell.settingsIcon.image = model.getIcon() | |
| 78 | + return cell | |
| 79 | + } | |
| 80 | + } | |
| 81 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
| 82 | + if indexPath.row == 3 { | |
| 83 | + let vc = ChooseApartmentsViewController() | |
| 84 | + navigationController?.pushViewController(vc, animated: true) | |
| 85 | + } | |
| 86 | + | |
| 87 | + } | |
| 88 | +} | |
| 89 | + | ... | ... |
| ... | ... | @@ -73,12 +73,14 @@ class VerificationView: UIView { |
| 73 | 73 | view.backgroundColor = UIColor(red: 246/255, green: 246/255, blue: 246/255, alpha: 1) |
| 74 | 74 | return view |
| 75 | 75 | }() |
| 76 | + | |
| 76 | 77 | var enterChosenAuthenticatorLabel: UILabel = { |
| 77 | 78 | var label = UILabel() |
| 78 | 79 | label.text = "Enter your email address" |
| 79 | 80 | label.font = UIFont(name: SkModernistFontType.bold.rawValue, size: 16) |
| 80 | 81 | return label |
| 81 | 82 | }() |
| 83 | + | |
| 82 | 84 | var emailTextField: UITextField = { |
| 83 | 85 | var textField = UITextField() |
| 84 | 86 | textField.backgroundColor = UIColor(red: 243/255, green: 243/255, blue: 243/255, alpha: 1) |
| ... | ... | @@ -93,6 +95,7 @@ class VerificationView: UIView { |
| 93 | 95 | textField.returnKeyType = .done |
| 94 | 96 | return textField |
| 95 | 97 | }() |
| 98 | + | |
| 96 | 99 | var phoneTextField: TextFieldWithPadding = { |
| 97 | 100 | var textField = TextFieldWithPadding() |
| 98 | 101 | textField.backgroundColor = UIColor(red: 243/255, green: 243/255, blue: 243/255, alpha: 1) |
| ... | ... | @@ -105,6 +108,7 @@ class VerificationView: UIView { |
| 105 | 108 | textField.isHidden = true |
| 106 | 109 | return textField |
| 107 | 110 | }() |
| 111 | + | |
| 108 | 112 | var verificationDescriptionLabel: UILabel = { |
| 109 | 113 | var label = UILabel() |
| 110 | 114 | label.numberOfLines = 0 |
| ... | ... | @@ -113,6 +117,7 @@ class VerificationView: UIView { |
| 113 | 117 | label.font = .systemFont(ofSize: 14, weight: .regular) |
| 114 | 118 | return label |
| 115 | 119 | }() |
| 120 | + | |
| 116 | 121 | var continueButton: UIButton = { |
| 117 | 122 | var button = UIButton() |
| 118 | 123 | button.setImage(UIImage(named: "RectangleWithShadow"), for: .normal) |
| ... | ... | @@ -121,6 +126,7 @@ class VerificationView: UIView { |
| 121 | 126 | button.layer.cornerRadius = 15 |
| 122 | 127 | return button |
| 123 | 128 | }() |
| 129 | + | |
| 124 | 130 | var continueLabel: UILabel = { |
| 125 | 131 | var label = UILabel() |
| 126 | 132 | label.text = "Continue" |
| ... | ... | @@ -128,21 +134,25 @@ class VerificationView: UIView { |
| 128 | 134 | label.textColor = .white |
| 129 | 135 | return label |
| 130 | 136 | }() |
| 137 | + | |
| 131 | 138 | var pointerImage: UIImageView = { |
| 132 | 139 | var image = UIImageView() |
| 133 | 140 | image.image = UIImage(named: "Pointer") |
| 134 | 141 | return image |
| 135 | 142 | }() |
| 143 | + | |
| 136 | 144 | var phonePickerView: PhoneNumberView = { |
| 137 | 145 | var view = PhoneNumberView() |
| 138 | 146 | view.isUserInteractionEnabled = true |
| 139 | 147 | return view |
| 140 | 148 | }() |
| 149 | + | |
| 141 | 150 | var showPickerButton: UIButton = { |
| 142 | 151 | var button = UIButton() |
| 143 | 152 | button.isHidden = true |
| 144 | 153 | return button |
| 145 | 154 | }() |
| 155 | + | |
| 146 | 156 | var flagPickerView: UIImageView = { |
| 147 | 157 | var image = UIImageView() |
| 148 | 158 | image.image = UIImage(named: "USA") |
| ... | ... | @@ -150,6 +160,7 @@ class VerificationView: UIView { |
| 150 | 160 | image.contentMode = .scaleAspectFit |
| 151 | 161 | return image |
| 152 | 162 | }() |
| 163 | + | |
| 153 | 164 | var flagPointerView: UIImageView = { |
| 154 | 165 | var image = UIImageView() |
| 155 | 166 | image.image = UIImage(named: "FlagPointer") | ... | ... |
| ... | ... | @@ -18,7 +18,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { |
| 18 | 18 | window = UIWindow(windowScene: windowScene) |
| 19 | 19 | let viewController = VerificationViewController() |
| 20 | 20 | let homeVC = HomeViewController() |
| 21 | - let navigation = UINavigationController(rootViewController: homeVC) | |
| 21 | + let residentVC = ResidentsViewController() | |
| 22 | + let navigation = UINavigationController(rootViewController: residentVC) | |
| 22 | 23 | navigation.isNavigationBarHidden = true |
| 23 | 24 | window?.rootViewController = navigation |
| 24 | 25 | window?.makeKeyAndVisible() | ... | ... |
Please
register
or
login
to post a comment