diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2020-08-28 15:14:08 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2020-08-28 21:54:55 +0200 |
| commit | 38502c179423ffc6430e898dfd2d4739ba4893e1 (patch) | |
| tree | efe625e8c28bdac42a27c0ef0dbf90c003a0330f /ios | |
| parent | 7570c21a87678e69ddf8735c608a8ee56972af6d (diff) | |
| download | mullvadvpn-38502c179423ffc6430e898dfd2d4739ba4893e1.tar.xz mullvadvpn-38502c179423ffc6430e898dfd2d4739ba4893e1.zip | |
Enable autoscroll on scroll to bottom
Diffstat (limited to 'ios')
| -rw-r--r-- | ios/MullvadVPN/LogStreamerViewController.swift | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ios/MullvadVPN/LogStreamerViewController.swift b/ios/MullvadVPN/LogStreamerViewController.swift index d033a8fc70..fc360781e8 100644 --- a/ios/MullvadVPN/LogStreamerViewController.swift +++ b/ios/MullvadVPN/LogStreamerViewController.swift @@ -69,6 +69,13 @@ class LogStreamerViewController: UIViewController, UITextViewDelegate { // Disable autoscroll if user scrolled up if translation.y > 0 { autoScroll = false + } else if translation.y < 0 { + // Enable autoscroll if user scrolled to the bottom of the view + let maxScrollY = scrollView.contentSize.height - scrollView.frame.height + + if targetContentOffset.pointee.y >= maxScrollY { + autoScroll = true + } } } |
