-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Criando a ContactListView e a ContactCellView #74
base: main
Are you sure you want to change the base?
Conversation
@@ -17,7 +17,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[QUESTION]
Opa @kleitonm, não deveriamos manter o HomeViewController ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[QUESTION]
@kleitonm opa, acha que poderiamos remover esses espaçamentos ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui também hehe 😄
} | ||
|
||
|
||
private lazy var contactCellView: ContactCellView = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[QUESTION]
Esses componentes de UI não deveria estar em um componente de UIView ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valeu pelas dicas, eu vou os ajustes, ainda faltam algumas coisas
@@ -9,4 +9,9 @@ import UIKit | |||
|
|||
class ContactCellView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lembra de herdar da BaseView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eliminar vestígios semânticos
# Conflicts: # solutions/devsprint-pedro-alvarez-2/FinanceApp.xcodeproj/project.pbxproj
CCDA8BF12947F08A00E5410D /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = CCDA8BF02947F08A00E5410D /* SnapshotTesting */; }; | ||
>>>>>>> feature/BaseView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cuidado com os conflitos ein
class ContactCellView: UITableViewCell { | ||
|
||
|
||
static let identifier = "ContactCellView" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pegar do próprio nome da classe
static let identifier = "ContactCellView" | ||
|
||
private let contactCell: ContactListView = { | ||
let contactCell = ContactListView() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
É uma célula ou é uma view?
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
backgroundColor = .clear | ||
confighierarchy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utilizar a estrutura base
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Salvar números mágicos em constantes.
|
||
|
||
// MARK: - Private Properties UI | ||
lazy var imagePerson: UIImageView = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private
Ajustando a ContactListView e a ContactCellView