Skip to content

Instantly share code, notes, and snippets.

@rockbruno
Last active September 13, 2018 18:00
Show Gist options
  • Save rockbruno/fde5357b8007042cf7196beb2dfaf424 to your computer and use it in GitHub Desktop.
Save rockbruno/fde5357b8007042cf7196beb2dfaf424 to your computer and use it in GitHub Desktop.
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