Criando a ContactListView e a ContactCellView#74
Criando a ContactListView e a ContactCellView#74kleitonm wants to merge 7 commits intodevpass-tech:mainfrom
Conversation
| guard let windowScene = (scene as? UIWindowScene) else { return } | ||
|
|
||
| self.window = UIWindow(frame: UIScreen.main.bounds) | ||
| self.window?.rootViewController = UINavigationController(rootViewController: HomeViewController()) |
There was a problem hiding this comment.
[QUESTION]
Opa @kleitonm, não deveriamos manter o HomeViewController ?
There was a problem hiding this comment.
Foi mal, eu esqueci que não era pra subir, eu tinha substituído para testar a minha tela
| } | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
[QUESTION]
@kleitonm opa, acha que poderiamos remover esses espaçamentos ?
There was a problem hiding this comment.
Eu ainda estou mexendo na tela, eu só abri o PR para irem acompanhando. Eu parei para fazer a BaseView pro ViewCode
There was a problem hiding this comment.
Boaaa, desculpe @kleitonm, não sabiaa uahauhu
Obrigado por avisar!
| // private lazy var titleLabel: UILabel = { | ||
| // let label = UILabel() | ||
| // label.translatesAutoresizingMaskIntoConstraints = false | ||
| // label.numberOfLines = 0 |
There was a problem hiding this comment.
[QUESTION]
Irá utilizar esse código no futuro ? Caso não, acho legal apagar
| }() | ||
|
|
||
| private func confighierarchy() { | ||
| // addSubview(titleLabel) |
There was a problem hiding this comment.
opa, o mesmo ponto acima, caso não for utilizar, acho legal apagar
| NSLayoutConstraint.activate([ | ||
|
|
||
| // titleLabel.topAnchor.constraint(equalTo: self.safeAreaLayoutGuide.topAnchor, constant: 32.0), | ||
| // titleLabel.trailingAnchor.constraint(equalTo: self.trailingAnchor), |
| } | ||
|
|
||
|
|
||
| private lazy var contactCellView: ContactCellView = { |
There was a problem hiding this comment.
[QUESTION]
Esses componentes de UI não deveria estar em um componente de UIView ?
There was a problem hiding this comment.
Valeu pelas dicas, eu vou os ajustes, ainda faltam algumas coisas
| @@ -9,4 +9,9 @@ import UIKit | |||
|
|
|||
| class ContactCellView { | |||
# Conflicts: # solutions/devsprint-pedro-alvarez-2/FinanceApp.xcodeproj/project.pbxproj
| FBB56216294777360060278D /* BaseViewHierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBB56215294777360060278D /* BaseViewHierarchy.swift */; }; | ||
| FBB56219294778320060278D /* BaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBB56218294778320060278D /* BaseView.swift */; }; | ||
| CCDA8BF12947F08A00E5410D /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = CCDA8BF02947F08A00E5410D /* SnapshotTesting */; }; | ||
| >>>>>>> feature/BaseView |
| class ContactCellView: UITableViewCell { | ||
|
|
||
|
|
||
| static let identifier = "ContactCellView" |
| static let identifier = "ContactCellView" | ||
|
|
||
| private let contactCell: ContactListView = { | ||
| let contactCell = ContactListView() |
| override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| backgroundColor = .clear | ||
| confighierarchy() |
|
|
||
| contactCell.topAnchor.constraint(equalTo: self.topAnchor), | ||
| contactCell.bottomAnchor.constraint(equalTo: self.bottomAnchor), | ||
| contactCell.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 20), |
There was a problem hiding this comment.
Salvar números mágicos em constantes.
|
|
||
|
|
||
| // MARK: - Private Properties UI | ||
| lazy var imagePerson: UIImageView = { |

Ajustando a ContactListView e a ContactCellView