UIEdgeInsetsInsetRect' has been replaced by instance method 'CGRect.inset(by:)
UIEdgeInsets in Swift 4.2
Earlier version
let padding = UIEdgeInsets(top: 0, left: 40, bottom: 0, right: 5) override func textRect(forBounds bounds: CGRect) -> CGRect { return UIEdgeInsetsInsetRect(bounds, padding) }
to swift 4.2 and Xcode 10
let padding = UIEdgeInsets(top: 0, left: 40, bottom: 0, right: 5) override func textRect(forBounds bounds: CGRect) -> CGRect { return rect.inset(by: GlobalClass.language == "ar" ? paddingR : padding) }