因此,对于Y,如果将图像的顶部设置为等于0的常量到superView的顶部.然后输入以下代码:
@IBOutlet weak var topc: NSLayoutConstraint!
let heightOfSuperview = self.view.bounds.height
topc.constant = heightOfSuperview * 0.90 // this has the same effect as multiplier
Run Code Online (Sandbox Code Playgroud)
这相当于Center.y乘数= 0.9:1
| 归档时间: |
|
| 查看次数: |
6903 次 |
| 最近记录: |