error: property 'frame' not found on object of type 'UIView *'

前端 未结 7 486
庸人自扰
庸人自扰 2021-01-30 17:14

I\'m debugging my code and trying to figure out the size of the view using this:

p view.frame.size.height

but I\'m getting this error:

7条回答
  •  半阙折子戏
    2021-01-30 17:54

    I had same problem and i solved it. Your class might be inherited from "UIViewController". It must be inherited from "UIView" so as to make an frame object in it.

提交回复
热议问题