Commit d5d455ee authored by Maarten Billemont's avatar Maarten Billemont

Fix issues with content insets for sites across OS versions.

parent e6ae0679
Pipeline #148858976 failed with stage
in 16 minutes and 55 seconds
......@@ -120,12 +120,14 @@ typedef NS_OPTIONS( NSUInteger, MPPasswordsTips ) {
PearlRemoveNotificationObservers();
}
- (void)viewWillLayoutSubviews {
- (void)viewDidLayoutSubviews {
self.collectionView.contentInset = [self.collectionView occludedInsets];
self.collectionView.scrollIndicatorInsets = self.collectionView.contentInset;
[super viewDidLayoutSubviews];
[super viewWillLayoutSubviews];
if (@available( iOS 11, * )) {
self.collectionView.layoutMargins =
UIEdgeInsetsMake( [self.collectionView occludedInsets].top - self.view.safeAreaInsets.top, 0, 0, 0 );
}
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
......
......@@ -1149,7 +1149,8 @@ Note that this feature requires you enable the Save Password option and have pur
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" minimumZoomScale="0.0" maximumZoomScale="0.0" keyboardDismissMode="interactive" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="aXw-tn-8Sj" userLabel="Password Collection">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="safeArea" id="Mv1-29-TWx">
<edgeInsets key="layoutMargins" top="100" left="0.0" bottom="0.0" right="0.0"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="layoutMargins" id="Mv1-29-TWx">
<size key="itemSize" width="355" height="100"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
......@@ -1157,7 +1158,7 @@ Note that this feature requires you enable the Save Password option and have pur
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPSiteCell" id="W2g-yv-V3V" customClass="MPSiteCell">
<rect key="frame" x="29.5" y="10" width="355" height="100"/>
<rect key="frame" x="29.5" y="110" width="355" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
<rect key="frame" x="0.0" y="0.0" width="355" height="100"/>
......
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