Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func setButtonUI (containerView: UIStackView) {
- for view in containerView.subviews {
- if let btn = view as? UIButton {
- btn.layer.cornerRadius = 10
- btn.setTitleColor(UIColor(red: 0.0/255.0, green: 51.0/255.0, blue: 102.0/255.0, alpha: 1.0), for: .normal)
- btn.layer.shadowRadius = 0.5
- btn.layer.shadowOpacity = 0.5
- btn.layer.shadowOffset = CGSize(width: 0.5, height: 0.5)
- btn.layer.backgroundColor = UIColor.white.cgColor
- //here is where im testing the Q key, where
- //where title and bg is changing, but the radius, opacity and offset isnt :(
- if btn.currentTitle == "Q" {
- btn.setTitle("F", for: .normal)
- btn.layer.backgroundColor = UIColor.black.cgColor
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement