I'm getting a SwiftLint warning on this line:
return UIEdgeInsetsMake(topInset, leftInset, bottomInset, rightInset)
This is the warning :
Legacy Constructor Violation: Swift constructors are preferred over legacy convenience functions. (legacy_constructor)
I'm getting a warning on this line as well:
return CGRectInset(bounds, insetX, insetY)
Legacy CGGeometry Functions Violation: Struct extension properties and methods are preferred over legacy functions (legacy_cggeometry_functions)
What is the Swift version for UIEdgeInsetsMake
and CGRectInset
?