Value of type ‘(cgrect) – > cgrect’ has no member: it’s because you define the wrong variable type
Value of type '(CGRect) -> CGRect' has no member 'maxY'
Value of type '(CGRect) -> CGRect' has no member 'maxX'
Value of type '(CGRect) -> CGRect' has no member 'width'
Value of type '(CGRect) -> CGRect' has no member 'height'
Value of type '(CGRect) -> CGRect' has no member 'size'
It’s because the attribute of a variable you defined is wrong. It should beCGFloat
And you don’t specify the variable type. The system recognizes it by defaultInt
perhapsDouble
type
Let framewidth = 300 // recognized as int
//Change to
let frameWidth: CGFloat = 300