Advertisement
Guest User

Untitled

a guest
May 20th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import Foundation
  2. import UIKit
  3.  
  4. var test = false
  5.  
  6. class MyButton: UIButton {
  7.  
  8. required init?(coder aDecoder: NSCoder) {
  9. super.init(coder: aDecoder)
  10.  
  11.  
  12. if (test == true)
  13. {
  14. backgroundColor = UIColor.white
  15. setTitleColor(UIColor.black, for: [])
  16. }
  17.  
  18. layer.borderWidth = 1.0
  19.  
  20. let myColor = UIColor.clear
  21. layer.borderColor = myColor.cgColor
  22.  
  23.  
  24. layer.cornerRadius = 15.0
  25. clipsToBounds = true
  26.  
  27.  
  28.  
  29.  
  30. }
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement