Swift 2.0 using Uneclared type UIColor

Why can't I use UIColor in Swift 2.0?

It makes no sense.

enter image description here

+6
source share
2 answers

Just add import UIKit at the top and it will work fine.

+28
source

You need to import UIKit to use UIColor .

+6
source

All Articles