On using this function in swift and i am getting compiler error. Function is:
在swift中使用此函数,我收到编译器错误。功能是:
class func imageWithImage (imageToResize : UIImage, scaledToSize newSize : CGSize) {
return imageToResize;
}
and the error are:
而错误是:
- Use of undeclared type 'UIImage'
- 使用未声明类型'UIImage'
- Use of undeclared type 'CGSize'
- 使用未声明类型'CGSize'
What's wrong with this..? what can i do to use UIImage in Swift..?
这有什么问题..?我怎么能在Swift中使用UIImage ..?
1 个解决方案
#1
69
Did you add import UIKit
to your file?
您是否在文件中添加了导入UIKit?
#1
69
Did you add import UIKit
to your file?
您是否在文件中添加了导入UIKit?