Skip to content

Instantly share code, notes, and snippets.

@cardoso
Created July 27, 2020 20:03
Show Gist options
  • Save cardoso/2fb16f2166197f94357327659e92dab7 to your computer and use it in GitHub Desktop.
Save cardoso/2fb16f2166197f94357327659e92dab7 to your computer and use it in GitHub Desktop.
extension JoinViewController {
func setupViews() {
setupBuyerButton()
setupSellerButton()
}
private func setupBuyerButton() {
buyerButton.translatesAutoresizingMaskIntoConstraints = false
buyerButton.setTitleColor(.systemBlue, for: .normal)
buyerButton.setTitle("Buyer 🙋", for: .normal)
buyerButton.titleLabel?.font = .systemFont(ofSize: 32)
view.addSubview(buyerButton)
}
private func setupSellerButton() {
sellerButton.translatesAutoresizingMaskIntoConstraints = false
sellerButton.setTitleColor(.systemBlue, for: .normal)
sellerButton.setTitle("Seller 🧑‍💼", for: .normal)
sellerButton.titleLabel?.font = .systemFont(ofSize: 32)
view.addSubview(sellerButton)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment