Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of undeclared type 'UIImage' in Swift

On using this function in swift and i am getting compiler error. Function is:

class func imageWithImage (imageToResize : UIImage, scaledToSize newSize : CGSize) {     return imageToResize; } 

and the error are:

  1. Use of undeclared type 'UIImage'
  2. Use of undeclared type 'CGSize'

What's wrong with this..? what can i do to use UIImage in Swift..?

like image 724
Gaurav Pandey Avatar asked Jul 30 '14 08:07

Gaurav Pandey


1 Answers

Did you add import UIKit to your file?

like image 50
ansible Avatar answered Oct 16 '22 08:10

ansible