0
我有两个按钮,我想要彼此相邻,每个占用屏幕宽度的一半(带边距)(即它们的宽度无论如何都是相同的屏幕尺寸)。有两个项目,每个都占用一半的屏幕宽度
我有以下几点:
contact.Below(auctioneerView, 10f),
contact.AtLeftOf (this, 10f),
contact.ToLeftOf (report, 10f),
contact.Height().EqualTo(50),
report.Below(auctioneerView, 10f),
report.Height().EqualTo(50),
report.AtRightOf (contact, 10f),
report.WithSameRight(this),
我已经尝试设置使用
report.Width().EqualTo(this.Frame.Width - 20f),
宽度不过,正如我怀疑,在当时的约束是建立不工作, view
没有width
所以它是0
如何使用FluentLayout
来获得这两个按钮分享屏幕的宽度?
谢谢,我设法使用它工作。 –
@DavidPilkington不错!乐意效劳。 –