Closed LonoS closed 6 years ago
So i tried to fix those two errors for a long time now. I found nothing useful on the internet. First one: Type 'NSString' has no member 'font'
return [.font: randomFont(), .kern: CGFloat(8) as NSObject, .foregroundColor: OCRColor(red: 27/255 + randomFloat(0.2), green: 16/255 + randomFloat(0.2), blue: 16/255 + randomFloat(0.2), alpha: 80/100 + randomFloat(0.2)), .paragraphStyle: paragraphStyle]
Second one:
Cannot invoke 'draw' with an argument list of type '(in: CGRect, withAttributes: [NSAttributedStringKey : Any])'
NSString(string: code).draw(in: CGRect(origin: CGPoint(x: 0 + randomFloat(5), y: -15.5 + randomFloat(5)), size: randomImg.size), withAttributes: randomFontAttributes())
Thanks in advance for your answers.
@garnele007 Why did you close this without any comment?
Set the SWIFT_VERSION to 4.
@palmerc, setting swift version to 4, didn't fix this for me
So i tried to fix those two errors for a long time now. I found nothing useful on the internet. First one: Type 'NSString' has no member 'font'
Second one:
Cannot invoke 'draw' with an argument list of type '(in: CGRect, withAttributes: [NSAttributedStringKey : Any])'
Thanks in advance for your answers.