Skip to content

Commit

Permalink
[Chips] Example respects safe area (#4856)
Browse files Browse the repository at this point in the history
Update: ChipsTypicalUseViewController.m to respect safe area in landscape. Closes issue #3704.

iPhone X / iOS 11.4
  • Loading branch information
GitPushPullLegs authored and jverkoey committed Aug 21, 2018
1 parent 0fd0765 commit 6e6a6bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/Chips/examples/ChipsTypicalUseViewController.m
Expand Up @@ -47,7 +47,13 @@ - (void)viewDidLoad {

[MDCChipViewTypographyThemer applyTypographyScheme:self.typographyScheme
toChipView:_sizingChip];


#if defined(__IPHONE_11_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0)
if (@available(iOS 11.0, *)) {
self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways;
}
#endif

self.collectionView.backgroundColor = [UIColor whiteColor];
self.collectionView.delaysContentTouches = NO;
self.collectionView.contentInset = UIEdgeInsetsMake(20, 20, 20, 20);
Expand Down

0 comments on commit 6e6a6bf

Please sign in to comment.