From 984434cca4b4e43a79fcc0aba3e7b2124374469b Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sat, 27 Sep 2014 14:53:30 -0400 Subject: [PATCH] Remove header hack to inset password cells, use collection layout instead. --- MasterPassword/ObjC/iOS/MPPasswordsViewController.m | 12 ------------ MasterPassword/ObjC/iOS/Storyboard.storyboard | 10 +++------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPPasswordsViewController.m b/MasterPassword/ObjC/iOS/MPPasswordsViewController.m index b0dc155f..a5bd2e3c 100644 --- a/MasterPassword/ObjC/iOS/MPPasswordsViewController.m +++ b/MasterPassword/ObjC/iOS/MPPasswordsViewController.m @@ -105,12 +105,6 @@ #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 sizeForItemAtIndexPath:(NSIndexPath *)indexPath { @@ -147,12 +141,6 @@ referenceSizeForHeaderInSection:(NSInteger)section { return cell; } -- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind - atIndexPath:(NSIndexPath *)indexPath { - - return [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"MPPasswordHeader" forIndexPath:indexPath]; -} - #pragma mark - UIScrollDelegate - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { diff --git a/MasterPassword/ObjC/iOS/Storyboard.storyboard b/MasterPassword/ObjC/iOS/Storyboard.storyboard index 99038c25..12755ae4 100644 --- a/MasterPassword/ObjC/iOS/Storyboard.storyboard +++ b/MasterPassword/ObjC/iOS/Storyboard.storyboard @@ -1060,7 +1060,7 @@ - + @@ -1081,9 +1081,9 @@ - + - + @@ -1475,10 +1475,6 @@ - - - -