[英]Fill width of button inside collection view cell
Is there an easy way of doing this? 有一个简单的方法吗? I'm using storyboard to align a button inside a cell manually (set width/height) trying to get it to fit inside a cell within a collection view.
我正在使用情节提要来手动对齐单元格内部的按钮(设置宽度/高度),以使其适合集合视图中的单元格。 The problem is that while it may fit one version of iphone, example iPhone 6 it doesn't fit on iPhone 5 - different resolutions and all.
问题在于,尽管它可能适合一个版本的iPhone,例如iPhone 6,但不适用于iPhone 5-分辨率和所有分辨率都不同。
Is there a Swift way of forcing the button width to fit inside cell, as in fit the full width of the cell? 是否有一种快速的方法来强制按钮宽度适合单元格内部,就像适合单元格的整个宽度一样?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.