aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-11-05 02:09:40 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-05 02:09:40 +0100
commit8ec38e1d2bec100e314788ef481ebea4a4a32746 (patch)
tree7bc64f91e212193cd5545963e1ccfc34c39aceba
parentXCode: use old network extension ID (diff)
downloadwireguard-apple-8ec38e1d2bec100e314788ef481ebea4a4a32746.tar.xz
wireguard-apple-8ec38e1d2bec100e314788ef481ebea4a4a32746.zip
Settings: account for bottom padding on iPhone X
Reported-by: Jeffrey A. Donenfeld <jad@runblue.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
index badb571..6bfad92 100644
--- a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
@@ -47,15 +47,15 @@ class SettingsTableViewController: UITableViewController {
logo.frame = CGRect(x: 0, y: 0, width: width, height: height)
logo.bounds = logo.frame.insetBy(dx: 2, dy: 2)
self.tableView.tableFooterView = logo
-
}
+
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
guard let logo = self.tableView.tableFooterView else { return }
- let fullHeight = max(self.tableView.contentSize.height, self.tableView.bounds.size.height - self.tableView.layoutMargins.top)
+ let bottomPadding = max(self.tableView.layoutMargins.bottom, CGFloat(10))
+ let fullHeight = max(self.tableView.contentSize.height, self.tableView.bounds.size.height - self.tableView.layoutMargins.top - bottomPadding)
let e = logo.frame
- let padding = CGFloat(10)
- logo.frame = CGRect(x: e.minX, y: fullHeight - e.height - padding, width: e.width, height: e.height)
+ logo.frame = CGRect(x: e.minX, y: fullHeight - e.height, width: e.width, height: e.height)
}
@objc func doneTapped() {