diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m
index 654af843..1ce5e990 100644
--- a/Limelight/ViewControllers/SettingsViewController.m
+++ b/Limelight/ViewControllers/SettingsViewController.m
@@ -61,35 +61,33 @@ static const int bitrateTable[] = {
return i - 1;
}
+// This view is rooted at a ScrollView. To make it scrollable,
+// we'll update content size here.
-(void)viewDidLayoutSubviews {
- // On iPhone layouts, this view is rooted at a ScrollView. To make it
- // scrollable, we'll update content size here.
- if (self.scrollView != nil) {
- CGFloat highestViewY = 0;
-
- // Enumerate the scroll view's subviews looking for the
- // highest view Y value to set our scroll view's content
- // size.
- for (UIView* view in self.scrollView.subviews) {
- // UIScrollViews have 2 default child views
- // which represent the horizontal and vertical scrolling
- // indicators. Ignore any views we don't recognize.
- if (![view isKindOfClass:[UILabel class]] &&
- ![view isKindOfClass:[UISegmentedControl class]] &&
- ![view isKindOfClass:[UISlider class]]) {
- continue;
- }
-
- CGFloat currentViewY = view.frame.origin.y + view.frame.size.height;
- if (currentViewY > highestViewY) {
- highestViewY = currentViewY;
- }
+ CGFloat highestViewY = 0;
+
+ // Enumerate the scroll view's subviews looking for the
+ // highest view Y value to set our scroll view's content
+ // size.
+ for (UIView* view in self.scrollView.subviews) {
+ // UIScrollViews have 2 default child views
+ // which represent the horizontal and vertical scrolling
+ // indicators. Ignore any views we don't recognize.
+ if (![view isKindOfClass:[UILabel class]] &&
+ ![view isKindOfClass:[UISegmentedControl class]] &&
+ ![view isKindOfClass:[UISlider class]]) {
+ continue;
}
- // Add a bit of padding so the view doesn't end right at the button of the display
- self.scrollView.contentSize = CGSizeMake(self.scrollView.contentSize.width,
- highestViewY + 20);
+ CGFloat currentViewY = view.frame.origin.y + view.frame.size.height;
+ if (currentViewY > highestViewY) {
+ highestViewY = currentViewY;
+ }
}
+
+ // Add a bit of padding so the view doesn't end right at the button of the display
+ self.scrollView.contentSize = CGSizeMake(self.scrollView.contentSize.width,
+ highestViewY + 20);
}
// Adjust the subviews for the safe area on the iPhone X.
diff --git a/iPad.storyboard b/iPad.storyboard
index 65f7c945..14eb2af8 100644
--- a/iPad.storyboard
+++ b/iPad.storyboard
@@ -58,7 +58,7 @@
-
+
@@ -285,6 +285,7 @@
+