Commit 58d59436 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Adds safeAreaInsets to HistoryCollectionVC

Bug: 802820
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I69d9bc940dc4c3be546dcf283a7463e20800cf10
Reviewed-on: https://chromium-review.googlesource.com/884568
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarLouis Romero <lpromero@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531925}
parent 32188789
...@@ -221,6 +221,17 @@ const CGFloat kSeparatorInset = 10; ...@@ -221,6 +221,17 @@ const CGFloat kSeparatorInset = 10;
[self.collectionView addGestureRecognizer:longPressRecognizer]; [self.collectionView addGestureRecognizer:longPressRecognizer];
} }
// Since contentInsetAdjustmentBehavior is
// UIScrollViewContentInsetAdjustmentNever on iOS11, update the horizontal
// insets manually to respect the safeArea.
- (void)viewSafeAreaInsetsDidChange {
[super viewSafeAreaInsetsDidChange];
UIEdgeInsets collectionContentInsets = self.collectionView.contentInset;
collectionContentInsets.left = self.view.safeAreaInsets.left;
collectionContentInsets.right = self.view.safeAreaInsets.right;
self.collectionView.contentInset = collectionContentInsets;
}
- (BOOL)isEditing { - (BOOL)isEditing {
return self.editor.isEditing; return self.editor.isEditing;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment