Skip to content

Instantly share code, notes, and snippets.

@rockbruno

rockbruno/ViewCode1.swift

Last active Sep 13, 2018
Embed
What would you like to do?
final class MyViewController: UIViewController {
private let myButton: UIButton = {
//
}()
 
private let myView: UIView = {
//
}()
 
//Mais umas 10 views aqui...
 
override func viewDidLoad() {
super.viewDidLoad()
setupViews()
}
 
private func setupViews() {
setupMyButton()
setupMyView()
//Setup para todas as outras views...
}
 
private func setupMyButton() {
view.addSubview(myButton)
//Umas 10 linhas de constraints….
}
 
private func setupMyView() {
view.addSubview(myView)
//Outras 10 linhas de constraints...
}
 
//Todos os outros setups...
 
//Toda lógica de ViewModel (se aplicável)...
 
//Toda a lógica de toque de botões e afins...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.