Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

kleitonm
Copy link

Ajustando a ContactListView e a ContactCellView

@@ -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())

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 ?

Copy link
Author

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

}



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 ?

Copy link
Author

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

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

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)

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),

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 = {

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 ?

Copy link
Author

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 {

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

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

@kleitonm
Copy link
Author

Captura de Tela 2022-12-16 às 11 03 57

# Conflicts:
#	solutions/devsprint-pedro-alvarez-2/FinanceApp.xcodeproj/project.pbxproj
CCDA8BF12947F08A00E5410D /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = CCDA8BF02947F08A00E5410D /* SnapshotTesting */; };
>>>>>>> feature/BaseView

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"

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()

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()

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),

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 = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants