Remove header hack to inset password cells, use collection layout instead.
This commit is contained in:
parent
064122f36d
commit
984434cca4
@ -105,12 +105,6 @@
|
|||||||
|
|
||||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||||
|
|
||||||
- (CGSize) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout
|
|
||||||
referenceSizeForHeaderInSection:(NSInteger)section {
|
|
||||||
|
|
||||||
return CGSizeMake( collectionView.bounds.size.width, CGRectGetBottom( self.passwordsSearchBar.frame ).y );
|
|
||||||
}
|
|
||||||
|
|
||||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout
|
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout
|
||||||
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
|
||||||
@ -147,12 +141,6 @@ referenceSizeForHeaderInSection:(NSInteger)section {
|
|||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind
|
|
||||||
atIndexPath:(NSIndexPath *)indexPath {
|
|
||||||
|
|
||||||
return [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"MPPasswordHeader" forIndexPath:indexPath];
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - UIScrollDelegate
|
#pragma mark - UIScrollDelegate
|
||||||
|
|
||||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
||||||
|
@ -1060,7 +1060,7 @@
|
|||||||
<!--Passwords View Controller-->
|
<!--Passwords View Controller-->
|
||||||
<scene sceneID="I40-Es-1gK">
|
<scene sceneID="I40-Es-1gK">
|
||||||
<objects>
|
<objects>
|
||||||
<viewController automaticallyAdjustsScrollViewInsets="NO" id="nkY-z6-8jd" customClass="MPPasswordsViewController" sceneMemberID="viewController">
|
<viewController id="nkY-z6-8jd" customClass="MPPasswordsViewController" sceneMemberID="viewController">
|
||||||
<layoutGuides>
|
<layoutGuides>
|
||||||
<viewControllerLayoutGuide type="top" id="S9X-2T-e1e"/>
|
<viewControllerLayoutGuide type="top" id="S9X-2T-e1e"/>
|
||||||
<viewControllerLayoutGuide type="bottom" id="c12-XI-Rv9"/>
|
<viewControllerLayoutGuide type="bottom" id="c12-XI-Rv9"/>
|
||||||
@ -1081,9 +1081,9 @@
|
|||||||
<inset key="scrollIndicatorInsets" minX="0.0" minY="108" maxX="0.0" maxY="0.0"/>
|
<inset key="scrollIndicatorInsets" minX="0.0" minY="108" maxX="0.0" maxY="0.0"/>
|
||||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Mv1-29-TWx">
|
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Mv1-29-TWx">
|
||||||
<size key="itemSize" width="300" height="100"/>
|
<size key="itemSize" width="300" height="100"/>
|
||||||
<size key="headerReferenceSize" width="50" height="108"/>
|
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||||
<inset key="sectionInset" minX="10" minY="10" maxX="10" maxY="10"/>
|
<inset key="sectionInset" minX="10" minY="118" maxX="10" maxY="10"/>
|
||||||
</collectionViewFlowLayout>
|
</collectionViewFlowLayout>
|
||||||
<cells>
|
<cells>
|
||||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPPasswordCell" id="W2g-yv-V3V" customClass="MPPasswordCell">
|
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPPasswordCell" id="W2g-yv-V3V" customClass="MPPasswordCell">
|
||||||
@ -1475,10 +1475,6 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</collectionViewCell>
|
</collectionViewCell>
|
||||||
</cells>
|
</cells>
|
||||||
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MPPasswordHeader" id="yzh-hh-YjZ">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="108"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
</collectionReusableView>
|
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="dataSource" destination="nkY-z6-8jd" id="5DW-tc-rAp"/>
|
<outlet property="dataSource" destination="nkY-z6-8jd" id="5DW-tc-rAp"/>
|
||||||
<outlet property="delegate" destination="nkY-z6-8jd" id="xhr-Qn-SBe"/>
|
<outlet property="delegate" destination="nkY-z6-8jd" id="xhr-Qn-SBe"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user