Skip to content

Commit 3b8828d

Browse files
Juliane FerreiraJulianeGF
authored andcommitted
Inicia implementacao da view de informacoes do imovel
1 parent 5dd6a08 commit 3b8828d

3 files changed

Lines changed: 92 additions & 0 deletions

File tree

solutions/devsprint-andre-nogueira-1/RealEstateApp.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
54E204CB28051E0A009FFEDC /* AccountViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54E204CA28051E0A009FFEDC /* AccountViewModel.swift */; };
2525
8B5548A728061AB400714870 /* LoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5548A628061AB400714870 /* LoginModel.swift */; };
2626
8B5548A928061B8000714870 /* LoginAPIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B5548A828061B8000714870 /* LoginAPIClient.swift */; };
27+
8BD13BF3281868DF001756F4 /* PropertyInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD13BF2281868DF001756F4 /* PropertyInfoView.swift */; };
2728
980789CB275E8FAF00CED39A /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980789CA275E8FAF00CED39A /* SettingsViewController.swift */; };
2829
980789CE275E943D00CED39A /* FavoritesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980789CD275E943C00CED39A /* FavoritesViewController.swift */; };
2930
980789D9275EA3C900CED39A /* AccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 980789D8275EA3C900CED39A /* AccountViewController.swift */; };
@@ -81,6 +82,7 @@
8182
54E204CA28051E0A009FFEDC /* AccountViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountViewModel.swift; sourceTree = "<group>"; };
8283
8B5548A628061AB400714870 /* LoginModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginModel.swift; sourceTree = "<group>"; };
8384
8B5548A828061B8000714870 /* LoginAPIClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginAPIClient.swift; sourceTree = "<group>"; };
85+
8BD13BF2281868DF001756F4 /* PropertyInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PropertyInfoView.swift; sourceTree = "<group>"; };
8486
980789CA275E8FAF00CED39A /* SettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
8587
980789CD275E943C00CED39A /* FavoritesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoritesViewController.swift; sourceTree = "<group>"; };
8688
980789D8275EA3C900CED39A /* AccountViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountViewController.swift; sourceTree = "<group>"; };
@@ -145,6 +147,14 @@
145147
path = Utils;
146148
sourceTree = "<group>";
147149
};
150+
8BD13BF1281868C1001756F4 /* PropertyInfo */ = {
151+
isa = PBXGroup;
152+
children = (
153+
8BD13BF2281868DF001756F4 /* PropertyInfoView.swift */,
154+
);
155+
path = PropertyInfo;
156+
sourceTree = "<group>";
157+
};
148158
980789C9275E8F8E00CED39A /* Settings */ = {
149159
isa = PBXGroup;
150160
children = (
@@ -195,6 +205,7 @@
195205
980C0C172704F1D500F8100A /* Screens */ = {
196206
isa = PBXGroup;
197207
children = (
208+
8BD13BF1281868C1001756F4 /* PropertyInfo */,
198209
54C4595528077B4B004DD3DF /* Utils */,
199210
B0D7AA952805F05B006177F8 /* TabBar */,
200211
980C0C182704F1DE00F8100A /* PropertyList */,
@@ -472,6 +483,7 @@
472483
543091792811EB4100BDC903 /* UIView+Extensions.swift in Sources */,
473484
54309171281094F900BDC903 /* BaseView.swift in Sources */,
474485
980789CE275E943D00CED39A /* FavoritesViewController.swift in Sources */,
486+
8BD13BF3281868DF001756F4 /* PropertyInfoView.swift in Sources */,
475487
986153D02704EE2B00838CA6 /* AppDelegate.swift in Sources */,
476488
986153D22704EE2B00838CA6 /* SceneDelegate.swift in Sources */,
477489
A50AC3FC28089FEA00873216 /* Pricing.swift in Sources */,

solutions/devsprint-andre-nogueira-1/RealEstateApp/Screens/PropertyDetails/PropertyDetailsViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import UIKit
99

1010
class PropertyDetailsViewController: UIViewController {
1111

12+
let propertyInfoView = PropertyInfoView()
13+
1214
private lazy var propertyDetailsView: PropertyDetailsView = {
1315
let view = PropertyDetailsView()
1416
view.sendContactButton.addTarget(self, action: #selector(sendContactForm), for: .touchUpInside)
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import UIKit
2+
3+
class PropertyInfoView: UIView {
4+
5+
private lazy var priceLabel: UILabel = {
6+
let label = UILabel()
7+
label.text = " R$ 405.000"
8+
label.font = .systemFont(ofSize: 20)
9+
label.tintColor = .black
10+
label.font = .boldSystemFont(ofSize: 20)
11+
label.translatesAutoresizingMaskIntoConstraints = false
12+
return label
13+
}()
14+
15+
private lazy var buildingLabel: UILabel = {
16+
let label = UILabel()
17+
label.text = "Condomínio R$ 495 IPTU R$ 0"
18+
label.tintColor = .black
19+
label.translatesAutoresizingMaskIntoConstraints = false
20+
return label
21+
}()
22+
23+
private lazy var infoLabel: UILabel = {
24+
let label = UILabel()
25+
label.text = "69 m² 3 quartos 2 banheiros 1 vaga"
26+
label.font = UIFont.systemFont(ofSize: 14)
27+
label.textColor = UIColor.lightGray.withAlphaComponent(0.9)
28+
label.translatesAutoresizingMaskIntoConstraints = false
29+
return label
30+
}()
31+
32+
private lazy var addressLabel: UILabel = {
33+
let label = UILabel()
34+
label.text = "Sem endereço"
35+
label.font = UIFont.systemFont(ofSize: 14)
36+
label.textColor = UIColor.lightGray.withAlphaComponent(0.9)
37+
label.translatesAutoresizingMaskIntoConstraints = false
38+
return label
39+
}()
40+
41+
init() {
42+
super.init(frame: .zero)
43+
self.hierarchy()
44+
self.setConstraints()
45+
}
46+
47+
required init?(coder: NSCoder) {
48+
fatalError("init(coder:) has not been implemented")
49+
}
50+
51+
func hierarchy() {
52+
[priceLabel, buildingLabel, infoLabel, addressLabel].forEach {
53+
addSubview($0)
54+
}
55+
}
56+
57+
func setConstraints() {
58+
NSLayoutConstraint.activate([
59+
priceLabel.topAnchor.constraint(equalTo: bottomAnchor, constant: 10),
60+
priceLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -16),
61+
priceLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: 16),
62+
63+
buildingLabel.topAnchor.constraint(equalTo: priceLabel.bottomAnchor, constant: 10),
64+
buildingLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -16),
65+
buildingLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: 16),
66+
67+
infoLabel.topAnchor.constraint(equalTo: buildingLabel.bottomAnchor, constant: 10),
68+
infoLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -16),
69+
infoLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: 16),
70+
71+
addressLabel.topAnchor.constraint(equalTo: infoLabel.bottomAnchor, constant: 10),
72+
addressLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -16),
73+
addressLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: 16),
74+
75+
bottomAnchor.constraint(equalTo: addressLabel.bottomAnchor, constant: 10)
76+
])
77+
}
78+
}

0 commit comments

Comments
 (0)