在代码中自动调整 UIImageView 的大小
我正在将自定义 UITableViewCell 从 Interface Builder 移动到代码中,但我不确定如何复制自动调整大小上图。
是 self.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin); 吗?
I am moving a custom UITableViewCell from Interface Builder and into code, but I'm unsure of how to copy the autosizing in the image above.
Would it be self.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin);
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。自动调整大小会夹在边缘上,并且具有灵活的高度和宽度,所以它应该是,
No. The autosizing clamps to the edges and has flexible height and width so it should be,