From f6a29d9f503553d4abe6e415205a207d899aa98b Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sat, 3 Nov 2018 00:24:53 +0530 Subject: Tunnel edit: Use layoutMarginsGuide instead of constants Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift index 2f75869..2c217a1 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelEditTableViewController.swift @@ -466,7 +466,7 @@ class TunnelEditTableViewKeyValueCell: CopyableLabelTableViewCell { keyLabel.setContentCompressionResistancePriority(.defaultHigh + 2, for: .horizontal) NSLayoutConstraint.activate([ keyLabel.centerYAnchor.constraint(equalTo: contentView.centerYAnchor), - keyLabel.leftAnchor.constraint(equalTo: contentView.leftAnchor, constant: 8), + keyLabel.leftAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leftAnchor), widthRatioConstraint ]) contentView.addSubview(valueTextField) @@ -474,7 +474,7 @@ class TunnelEditTableViewKeyValueCell: CopyableLabelTableViewCell { NSLayoutConstraint.activate([ valueTextField.centerYAnchor.constraint(equalTo: contentView.centerYAnchor), valueTextField.leftAnchor.constraint(equalTo: keyLabel.rightAnchor, constant: 16), - valueTextField.rightAnchor.constraint(equalTo: contentView.rightAnchor, constant: -8), + valueTextField.rightAnchor.constraint(equalTo: contentView.layoutMarginsGuide.rightAnchor), ]) valueTextField.delegate = self -- cgit v1.2.3-59-g8ed1b