From e332d6cf0e3597bbd7f03dd37a836bb26bb20afe Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sat, 3 Nov 2018 00:24:53 +0530 Subject: [PATCH] Tunnel edit: Use layoutMarginsGuide instead of constants --- .../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