Value of type '(CGRect) -> CGRect' has no member:是因为你变量类型定义错了
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'
是因为你定义的某个变量属性不对,多半应该是 CGFloat
,而你没有规定变量类型,系统默认识别成了 Int
或者 Double
类型
let frameWidth = 300 // 识别为 Int
// 改为
let frameWidth: CGFloat = 300
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。