Hi Brian,
I hacked it with this (for anyone interested)...
let signUpButton: UIButton = {
let button = UIButton()
button.setTitle(" Sign up here.", for: .normal)
button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 12)
button.setTitleColor(.blue, for: .normal)
button.addTarget(self, action: #selector(handleShowSingUp), for: .touchUpInside)
return button
}()
let signUpLabel: UILabel = {
let label = UILabel()
label.text = "Don't have an account?"
label.font = UIFont.boldSystemFont(ofSize: 12)
label.textColor = UIColor.lightGray
label.textAlignment = .right
return label
}()
let signUpView: UIView = {
let v = UIView()
return v
}()
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.isNavigationBarHidden = true
view.backgroundColor = .white
setupSignUpView()
}
@objc func handleShowSingUp() {
let signUpVC = SignUpVC()
navigationController?.pushViewController(signUpVC, animated: true)
}
fileprivate func setupSignUpView() {
view.addSubview(signUpView)
signUpView.anchor(top: nil, left: nil, bottom: view.bottomAnchor, right: nil, paddingTop: 0, paddingLeft: 0, paddingBottom: 0, paddingRight: 0, width: 230, height: 50)
signUpView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
signUpView.addSubview(signUpLabel)
signUpLabel.anchor(top: signUpView.topAnchor, left: signUpView.leadingAnchor, bottom: nil, right: nil, paddingTop: 0, paddingLeft: 0, paddingBottom: 0, paddingRight: 0, width: 0, height: 50)
signUpView.addSubview(signUpButton)
signUpButton.anchor(top: signUpView.topAnchor, left: signUpLabel.trailingAnchor, bottom: nil, right: nil, paddingTop: 0, paddingLeft: 0, paddingBottom: 0, paddingRight: 0, width: 0, height: 50)
}
but how come the button doesn't show anything visually when you click on it? There's no subtle effect when you click on it.