Use of undeclared type 'UIImage' in Swift
20,641
Did you add import UIKit
to your file?
Author by
Gaurav Pandey
I’m a versatile, high-energy software engineer with 8 years of experience managing multiple aspects of the development process for multiple products mobile application, within the challenging time schedule.
Updated on September 07, 2020Comments
-
Gaurav Pandey over 3 years
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:
- Use of undeclared type 'UIImage'
- Use of undeclared type 'CGSize'
What's wrong with this..? what can i do to use UIImage in Swift..?