Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: remoting/client/ios/app/remoting_view_controller.mm

Issue 2855773002: [Remoting iOS] Adjust position and height of HostCollectionView (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ios/app/remoting_view_controller.mm
diff --git a/remoting/client/ios/app/remoting_view_controller.mm b/remoting/client/ios/app/remoting_view_controller.mm
index 7e22899e0fdc5d2683f85d00f65d522352329be1..1520e0bfdcd7000ee3d4f7e912a118a1faf509c9 100644
--- a/remoting/client/ios/app/remoting_view_controller.mm
+++ b/remoting/client/ios/app/remoting_view_controller.mm
@@ -106,6 +106,20 @@ static CGFloat kHostInset = 5.f;
}
}
+- (void)viewDidLayoutSubviews {
+ [super viewDidLayoutSubviews];
+
+ // Adjust the collection view's position and size so that it doesn't get
+ // overlayed by the navigation bar.
+ CGFloat collectionOffsetY =
+ _appBar.headerViewController.headerView.frame.size.height;
+ CGFloat collectionHeight = self.view.bounds.size.height - collectionOffsetY;
+ CGRect oldFrame = _collectionViewController.collectionView.frame;
+ _collectionViewController.collectionView.frame =
+ CGRectMake(oldFrame.origin.x, collectionOffsetY, oldFrame.size.width,
+ collectionHeight);
+}
+
#pragma mark - RemotingAuthenticationDelegate
- (void)nowAuthenticated:(BOOL)authenticated {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698