Showing
182 changed files
with
591 additions
and
15 deletions
Colors + Extension/Colors + Extension.swift
0 → 100644
2.13 KB
3.57 KB
966 Bytes
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "3Users.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "3 User@2x.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "3 User@3x.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} |
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "EmptySquere.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "Rectangle 8@2x.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "Rectangle 8@3x.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} |
InterQR-Internship/Assets.xcassets/AddResidentsScreen/EmptySquere.imageset/EmptySquere.png
0 → 100644
317 Bytes
InterQR-Internship/Assets.xcassets/AddResidentsScreen/EmptySquere.imageset/Rectangle 8@2x.png
0 → 100644
523 Bytes
InterQR-Internship/Assets.xcassets/AddResidentsScreen/EmptySquere.imageset/Rectangle 8@3x.png
0 → 100644
782 Bytes
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "FullSquere.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "Group 33542@2x.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "Group 33542@3x.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} |
750 Bytes
InterQR-Internship/Assets.xcassets/AddResidentsScreen/FullSquere.imageset/Group 33542@2x.png
0 → 100644
1.84 KB
InterQR-Internship/Assets.xcassets/AddResidentsScreen/FullSquere.imageset/Group 33542@3x.png
0 → 100644
3.72 KB
543 Bytes
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "Bin.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "Delete@2x.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "Delete@3x.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} |
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "filename" : "Plus.png", | ||
| 5 | + "idiom" : "universal", | ||
| 6 | + "scale" : "1x" | ||
| 7 | + }, | ||
| 8 | + { | ||
| 9 | + "filename" : "Group 33489@2x.png", | ||
| 10 | + "idiom" : "universal", | ||
| 11 | + "scale" : "2x" | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "filename" : "Group 33489@3x.png", | ||
| 15 | + "idiom" : "universal", | ||
| 16 | + "scale" : "3x" | ||
| 17 | + } | ||
| 18 | + ], | ||
| 19 | + "info" : { | ||
| 20 | + "author" : "xcode", | ||
| 21 | + "version" : 1 | ||
| 22 | + } | ||
| 23 | +} |
371 Bytes
466 Bytes
278 Bytes
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.545", | ||
| 9 | + "green" : "0.267", | ||
| 10 | + "red" : "0.000" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.910", | ||
| 9 | + "green" : "0.910", | ||
| 10 | + "red" : "0.882" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
InterQR-Internship/Assets.xcassets/UIColors/Gradient/GradientBlue/LeftColor.colorset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.545", | ||
| 9 | + "green" : "0.257", | ||
| 10 | + "red" : "0.000" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
InterQR-Internship/Assets.xcassets/UIColors/Gradient/GradientBlue/RightColor.colorset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.827", | ||
| 9 | + "green" : "0.561", | ||
| 10 | + "red" : "0.000" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
InterQR-Internship/Assets.xcassets/UIColors/TextColor/DarkBlueTextColor.colorset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.333", | ||
| 9 | + "green" : "0.216", | ||
| 10 | + "red" : "0.196" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "iphone" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "iphone" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + }, | ||
| 38 | + "properties" : { | ||
| 39 | + "localizable" : true | ||
| 40 | + } | ||
| 41 | +} |
InterQR-Internship/Assets.xcassets/UIColors/TextColor/LightGreyTextColor.colorset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.725", | ||
| 9 | + "green" : "0.725", | ||
| 10 | + "red" : "0.725" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
InterQR-Internship/Assets.xcassets/UIColors/TextColor/RedErrorTextColor.colorset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "0.980", | ||
| 8 | + "blue" : "0.180", | ||
| 9 | + "green" : "0.000", | ||
| 10 | + "red" : "1.000" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "color-space" : "srgb", | 5 | "color-space" : "srgb", |
| 6 | "components" : { | 6 | "components" : { |
| 7 | "alpha" : "1.000", | 7 | "alpha" : "1.000", |
| 8 | - "blue" : "1.000", | ||
| 9 | - "green" : "1.000", | 8 | + "blue" : "0.942", |
| 9 | + "green" : "0.929", | ||
| 10 | "red" : "1.000" | 10 | "red" : "1.000" |
| 11 | } | 11 | } |
| 12 | }, | 12 | }, |
| 1 | +{ | ||
| 2 | + "colors" : [ | ||
| 3 | + { | ||
| 4 | + "color" : { | ||
| 5 | + "color-space" : "srgb", | ||
| 6 | + "components" : { | ||
| 7 | + "alpha" : "1.000", | ||
| 8 | + "blue" : "0.954", | ||
| 9 | + "green" : "0.954", | ||
| 10 | + "red" : "0.954" | ||
| 11 | + } | ||
| 12 | + }, | ||
| 13 | + "idiom" : "universal" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "appearances" : [ | ||
| 17 | + { | ||
| 18 | + "appearance" : "luminosity", | ||
| 19 | + "value" : "dark" | ||
| 20 | + } | ||
| 21 | + ], | ||
| 22 | + "color" : { | ||
| 23 | + "color-space" : "srgb", | ||
| 24 | + "components" : { | ||
| 25 | + "alpha" : "1.000", | ||
| 26 | + "blue" : "1.000", | ||
| 27 | + "green" : "1.000", | ||
| 28 | + "red" : "1.000" | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + "idiom" : "universal" | ||
| 32 | + } | ||
| 33 | + ], | ||
| 34 | + "info" : { | ||
| 35 | + "author" : "xcode", | ||
| 36 | + "version" : 1 | ||
| 37 | + } | ||
| 38 | +} |
| @@ -8,10 +8,16 @@ | @@ -8,10 +8,16 @@ | ||
| 8 | import UIKit | 8 | import UIKit |
| 9 | 9 | ||
| 10 | class AddResidentsView: UIView { | 10 | class AddResidentsView: UIView { |
| 11 | + let blurEffect: UIVisualEffectView = { | ||
| 12 | + let blur = UIBlurEffect(style: UIBlurEffect.Style.systemMaterialDark) | ||
| 13 | + let obj = UIVisualEffectView(effect: blur) | ||
| 14 | + obj.autoresizingMask = [.flexibleWidth, .flexibleHeight] | ||
| 15 | + obj.alpha = 0.9 | ||
| 16 | + return obj | ||
| 17 | + }() | ||
| 18 | + | ||
| 11 | var transparentView: UIView = { | 19 | var transparentView: UIView = { |
| 12 | var obj = UIView() | 20 | var obj = UIView() |
| 13 | - obj.backgroundColor = .black | ||
| 14 | - obj.alpha = 0.5 | ||
| 15 | return obj | 21 | return obj |
| 16 | }() | 22 | }() |
| 17 | 23 | ||
| @@ -80,7 +86,8 @@ class AddResidentsView: UIView { | @@ -80,7 +86,8 @@ class AddResidentsView: UIView { | ||
| 80 | 86 | ||
| 81 | var managerButton: UIButton = { | 87 | var managerButton: UIButton = { |
| 82 | var obj = UIButton() | 88 | var obj = UIButton() |
| 83 | -// obj.setImage(<#T##image: UIImage?##UIImage?#>, for: <#T##UIControl.State#>) | 89 | + obj.setImage(UIImage(named: ""), for: .normal) |
| 90 | + obj.setImage(UIImage(named: ""), for: .selected) | ||
| 84 | return obj | 91 | return obj |
| 85 | }() | 92 | }() |
| 86 | 93 | ||
| @@ -131,6 +138,7 @@ class AddResidentsView: UIView { | @@ -131,6 +138,7 @@ class AddResidentsView: UIView { | ||
| 131 | addResidentButton.layer.insertSublayer(gradientBG, at: 0) | 138 | addResidentButton.layer.insertSublayer(gradientBG, at: 0) |
| 132 | 139 | ||
| 133 | addSubview(transparentView) | 140 | addSubview(transparentView) |
| 141 | + transparentView.addSubview(blurEffect) | ||
| 134 | 142 | ||
| 135 | addSubview(containerView) | 143 | addSubview(containerView) |
| 136 | containerView.addSubview(addResidentLabeL) | 144 | containerView.addSubview(addResidentLabeL) |
| @@ -222,5 +230,6 @@ class AddResidentsView: UIView { | @@ -222,5 +230,6 @@ class AddResidentsView: UIView { | ||
| 222 | override func layoutSubviews() { | 230 | override func layoutSubviews() { |
| 223 | super.layoutSubviews() | 231 | super.layoutSubviews() |
| 224 | gradientBG.frame = addResidentButton.bounds | 232 | gradientBG.frame = addResidentButton.bounds |
| 233 | + blurEffect.frame = transparentView.bounds | ||
| 225 | } | 234 | } |
| 226 | } | 235 | } |
| @@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
| 8 | import UIKit | 8 | import UIKit |
| 9 | 9 | ||
| 10 | class AddResidentsViewController: UIViewController { | 10 | class AddResidentsViewController: UIViewController { |
| 11 | - | ||
| 12 | var mainView = AddResidentsView() | 11 | var mainView = AddResidentsView() |
| 13 | 12 | ||
| 14 | override func loadView() { | 13 | override func loadView() { |
| @@ -16,5 +15,10 @@ class AddResidentsViewController: UIViewController { | @@ -16,5 +15,10 @@ class AddResidentsViewController: UIViewController { | ||
| 16 | } | 15 | } |
| 17 | 16 | ||
| 18 | override func viewDidLoad() { | 17 | override func viewDidLoad() { |
| 18 | + mainView.closeButton.addTarget(self, action: #selector(didTapCloseButton), for: .touchUpInside) | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + @objc func didTapCloseButton() { | ||
| 22 | + dismiss(animated: true, completion: nil) | ||
| 19 | } | 23 | } |
| 20 | } | 24 | } |
| @@ -8,8 +8,7 @@ | @@ -8,8 +8,7 @@ | ||
| 8 | import UIKit | 8 | import UIKit |
| 9 | 9 | ||
| 10 | class HomeTableViewCell: UITableViewCell { | 10 | class HomeTableViewCell: UITableViewCell { |
| 11 | - | ||
| 12 | - static let id = "HomeTableViewCell-ID" | 11 | + static let id = String(describing: HomeTableViewCell.self) |
| 13 | 12 | ||
| 14 | var containerView: UIView = { | 13 | var containerView: UIView = { |
| 15 | var obj = UIView() | 14 | var obj = UIView() |
| @@ -18,12 +17,14 @@ class HomeTableViewCell: UITableViewCell { | @@ -18,12 +17,14 @@ class HomeTableViewCell: UITableViewCell { | ||
| 18 | obj.layer.borderColor = UIColor(red: 0.89, green: 0.918, blue: 0.918, alpha: 1).cgColor | 17 | obj.layer.borderColor = UIColor(red: 0.89, green: 0.918, blue: 0.918, alpha: 1).cgColor |
| 19 | return obj | 18 | return obj |
| 20 | }() | 19 | }() |
| 20 | + | ||
| 21 | var leftStatusImage: UIImageView = { | 21 | var leftStatusImage: UIImageView = { |
| 22 | var obj = UIImageView() | 22 | var obj = UIImageView() |
| 23 | obj.image = UIImage(named: "LeftBlue") | 23 | obj.image = UIImage(named: "LeftBlue") |
| 24 | obj.contentMode = .scaleAspectFill | 24 | obj.contentMode = .scaleAspectFill |
| 25 | return obj | 25 | return obj |
| 26 | }() | 26 | }() |
| 27 | + | ||
| 27 | var doorNameLabel: UILabel = { | 28 | var doorNameLabel: UILabel = { |
| 28 | var obj = UILabel() | 29 | var obj = UILabel() |
| 29 | obj.font = .skModernist(type: .bold, ofSize: 16) | 30 | obj.font = .skModernist(type: .bold, ofSize: 16) |
| @@ -31,6 +32,7 @@ class HomeTableViewCell: UITableViewCell { | @@ -31,6 +32,7 @@ class HomeTableViewCell: UITableViewCell { | ||
| 31 | obj.text = "Front Door" | 32 | obj.text = "Front Door" |
| 32 | return obj | 33 | return obj |
| 33 | }() | 34 | }() |
| 35 | + | ||
| 34 | var doorLocationLabel: UILabel = { | 36 | var doorLocationLabel: UILabel = { |
| 35 | var obj = UILabel() | 37 | var obj = UILabel() |
| 36 | obj.textColor = UIColor(red: 0.725, green: 0.725, blue: 0.725, alpha: 1) | 38 | obj.textColor = UIColor(red: 0.725, green: 0.725, blue: 0.725, alpha: 1) |
| @@ -38,6 +40,7 @@ class HomeTableViewCell: UITableViewCell { | @@ -38,6 +40,7 @@ class HomeTableViewCell: UITableViewCell { | ||
| 38 | obj.text = "Home" | 40 | obj.text = "Home" |
| 39 | return obj | 41 | return obj |
| 40 | }() | 42 | }() |
| 43 | + | ||
| 41 | var lockStatusLabel: UILabel = { | 44 | var lockStatusLabel: UILabel = { |
| 42 | var obj = UILabel() | 45 | var obj = UILabel() |
| 43 | obj.textColor = UIColor(red: 0, green: 0.267, blue: 0.545, alpha: 1) | 46 | obj.textColor = UIColor(red: 0, green: 0.267, blue: 0.545, alpha: 1) |
| @@ -45,11 +48,13 @@ class HomeTableViewCell: UITableViewCell { | @@ -45,11 +48,13 @@ class HomeTableViewCell: UITableViewCell { | ||
| 45 | obj.text = "Locked" | 48 | obj.text = "Locked" |
| 46 | return obj | 49 | return obj |
| 47 | }() | 50 | }() |
| 51 | + | ||
| 48 | var rightStatusImage: UIImageView = { | 52 | var rightStatusImage: UIImageView = { |
| 49 | var obj = UIImageView() | 53 | var obj = UIImageView() |
| 50 | obj.image = UIImage(named: "RightBlue") | 54 | obj.image = UIImage(named: "RightBlue") |
| 51 | return obj | 55 | return obj |
| 52 | }() | 56 | }() |
| 57 | + | ||
| 53 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | 58 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 54 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 59 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 55 | layout() | 60 | layout() |
| @@ -61,6 +66,7 @@ class HomeTableViewCell: UITableViewCell { | @@ -61,6 +66,7 @@ class HomeTableViewCell: UITableViewCell { | ||
| 61 | 66 | ||
| 62 | func layout() { | 67 | func layout() { |
| 63 | selectionStyle = .none | 68 | selectionStyle = .none |
| 69 | + | ||
| 64 | addSubview(containerView) | 70 | addSubview(containerView) |
| 65 | containerView.addSubview(leftStatusImage) | 71 | containerView.addSubview(leftStatusImage) |
| 66 | containerView.addSubview(doorNameLabel) | 72 | containerView.addSubview(doorNameLabel) |
| @@ -73,34 +79,39 @@ class HomeTableViewCell: UITableViewCell { | @@ -73,34 +79,39 @@ class HomeTableViewCell: UITableViewCell { | ||
| 73 | $0.bottom.equalToSuperview().offset(-8) | 79 | $0.bottom.equalToSuperview().offset(-8) |
| 74 | $0.top.equalToSuperview().offset(8) | 80 | $0.top.equalToSuperview().offset(8) |
| 75 | } | 81 | } |
| 82 | + | ||
| 76 | leftStatusImage.snp.makeConstraints { | 83 | leftStatusImage.snp.makeConstraints { |
| 77 | $0.top.equalTo(containerView.snp.top).offset(19) | 84 | $0.top.equalTo(containerView.snp.top).offset(19) |
| 78 | $0.leading.equalTo(containerView.snp.leading).offset(23) | 85 | $0.leading.equalTo(containerView.snp.leading).offset(23) |
| 79 | $0.height.width.equalTo(41) | 86 | $0.height.width.equalTo(41) |
| 80 | } | 87 | } |
| 88 | + | ||
| 81 | doorNameLabel.snp.makeConstraints { | 89 | doorNameLabel.snp.makeConstraints { |
| 82 | $0.top.equalTo(snp.top).offset(22) | 90 | $0.top.equalTo(snp.top).offset(22) |
| 83 | $0.leading.equalTo(leftStatusImage.snp.trailing).offset(14) | 91 | $0.leading.equalTo(leftStatusImage.snp.trailing).offset(14) |
| 84 | } | 92 | } |
| 93 | + | ||
| 85 | doorLocationLabel.snp.makeConstraints { | 94 | doorLocationLabel.snp.makeConstraints { |
| 86 | $0.top.equalTo(doorNameLabel.snp.bottom) | 95 | $0.top.equalTo(doorNameLabel.snp.bottom) |
| 87 | $0.leading.equalTo(doorNameLabel.snp.leading) | 96 | $0.leading.equalTo(doorNameLabel.snp.leading) |
| 88 | } | 97 | } |
| 98 | + | ||
| 89 | lockStatusLabel.snp.makeConstraints { | 99 | lockStatusLabel.snp.makeConstraints { |
| 90 | $0.bottom.equalTo(snp.bottom).offset(-15) | 100 | $0.bottom.equalTo(snp.bottom).offset(-15) |
| 91 | $0.centerX.equalTo(snp.centerX) | 101 | $0.centerX.equalTo(snp.centerX) |
| 92 | } | 102 | } |
| 103 | + | ||
| 93 | rightStatusImage.snp.makeConstraints { | 104 | rightStatusImage.snp.makeConstraints { |
| 94 | $0.trailing.equalTo(snp.trailing).offset(-16) | 105 | $0.trailing.equalTo(snp.trailing).offset(-16) |
| 95 | $0.top.equalTo(snp.top).offset(19) | 106 | $0.top.equalTo(snp.top).offset(19) |
| 96 | } | 107 | } |
| 97 | } | 108 | } |
| 98 | -// func configureWithItem(_ item: DoorsModel) { | ||
| 99 | - | ||
| 100 | -// doorTypeLabel.text = item.purpose | ||
| 101 | -// doorLocationLabel.text = item.type | ||
| 102 | -// configureStatus(status: item.lockStatus) | ||
| 103 | -// rightStatusImageView.isHidden = false | ||
| 104 | -// } | 109 | + // func configureWithItem(_ item: DoorsModel) { |
| 110 | + | ||
| 111 | + // doorTypeLabel.text = item.purpose | ||
| 112 | + // doorLocationLabel.text = item.type | ||
| 113 | + // configureStatus(status: item.lockStatus) | ||
| 114 | + // rightStatusImageView.isHidden = false | ||
| 115 | + // } | ||
| 105 | } | 116 | } |
| 106 | 117 |
Please
register
or
login
to post a comment