Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- import ChameleonFramework
- class RootViewController: UIViewController {
- @IBOutlet var myImage: UIImageView!
- @IBOutlet var myTitle: UILabel!
- @IBOutlet var myDescription: UITextView!
- override func viewDidLoad() {
- super.viewDidLoad()
- myDescription.clipsToBounds = true
- myDescription.layer.cornerRadius = 10.0
- view.backgroundColor = ColorsFromImage(image: myImage.image!, withFlatScheme: false)[1]
- myDescription.backgroundColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
- myDescription.textColor = ContrastColorOf(backgroundColor: myDescription.backgroundColor!, returnFlat: false)
- myTitle.textColor = ContrastColorOf(backgroundColor: view.backgroundColor!, returnFlat: false)
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
- }
Add Comment
Please, Sign In to add comment