Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
每个人!我已经通过interface builder添加了我的自定义 UIView 。在我的自定义 UIView 类中,我覆盖了-awakeFromNib我想注销我的 UIView 的 Frame.x 或 Frame.y在 nib 文件中设置的方法。谁能帮我?提前致谢!
-awakeFromNib
PS:无论如何要获得我在界面构建器中设置的框架矩形吗?
在调用 viewWillAppear 之前,您的视图框架没有意义。以我的经验,在此之前框架是 CGRectZero 。请记住,在您的故事板中,您使用的是“模拟指标”