From: Roopesh Chander Date: Fri, 2 Nov 2018 18:54:53 +0000 (+0530) Subject: Tunnel edit: Use layoutMarginsGuide instead of constants X-Git-Tag: 0.0.20181104-1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a29d9f503553d4abe6e415205a207d899aa98b;p=thirdparty%2Fwireguard-apple.git Tunnel edit: Use layoutMarginsGuide instead of constants Signed-off-by: Roopesh Chander --- 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