Guest User

Untitled

a guest
Nov 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. import UIKit
  2. import ChameleonFramework
  3. class RootViewController: UIViewController {
  4.  
  5. @IBOutlet var myImage: UIImageView!
  6. @IBOutlet var myTitle: UILabel!
  7. @IBOutlet var myDescription: UITextView!
  8.  
  9. override func viewDidLoad() {
  10. super.viewDidLoad()
  11.  
  12. myDescription.clipsToBounds = true
  13. myDescription.layer.cornerRadius = 10.0
  14.  
  15. view.backgroundColor = ColorsFromImage(image: myImage.image!, withFlatScheme: false)[1]
  16. myDescription.backgroundColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
  17. myDescription.textColor = ContrastColorOf(backgroundColor: myDescription.backgroundColor!, returnFlat: false)
  18. myTitle.textColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
  19. }
  20.  
  21. override func didReceiveMemoryWarning() {
  22. super.didReceiveMemoryWarning()
  23. // Dispose of any resources that can be recreated.
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment