只需要将所有的CGFloat转化为NSInteger即可
func imageScaleSize(newSize: CGSize) -> UIImage{
let width = NSInteger(newSize.width)
let height = NSInteger(newSize.height)
UIGraphicsBeginImageContext(CGSize( width, height: height));
self.drawInRect(CGRect(x: 0, y: 0, width, height: height))
let newImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext();
return newImage;
}