Seemingly out of nowhere I started getting hundreds of errors associated with two extension functions that I use frequently.
I tried commenting out all the new code that preceding this error showing up. I also tried cleaning my build folder. How do I get ride of the error found in the title of this post? Why did it randomly appear when I've been using these extensions successfully for months?
extension UITableViewCell {
public func getSize(large: CGFloat, medium: CGFloat, small: CGFloat) -> CGFloat {
var size = CGFloat()
let screenHeight = Int(UIScreen.main.bounds.height)
if screenHeight >= 800 {
size = large
} else if screenHeight >= 600 {
size = medium
} else {
size = small
}
return size
}
public func formatPrice(_ price: Int) -> String {
let lastDigit = price % 10
var stringPrice = ""
if lastDigit == 0 {
stringPrice = "$\(Double(price) / 100)0"
} else {
stringPrice = "$\(Double(price) / 100)"
}
return stringPrice
}
}