From 3a77f2afa95bbb2d280b305ca4e1dcb19d391e97 Mon Sep 17 00:00:00 2001 From: questbeat Date: Mon, 6 Apr 2015 01:34:13 +0900 Subject: [PATCH] Refactoring --- QBImagePicker.xcodeproj/project.pbxproj | 8 -------- QBImagePicker/QBAssetsViewController.m | 11 +++++------ QBImagePicker/QBFooterView.h | 13 ------------- QBImagePicker/QBFooterView.m | 13 ------------- QBImagePicker/QBImagePicker.storyboard | 8 ++++---- 5 files changed, 9 insertions(+), 44 deletions(-) delete mode 100755 QBImagePicker/QBFooterView.h delete mode 100755 QBImagePicker/QBFooterView.m diff --git a/QBImagePicker.xcodeproj/project.pbxproj b/QBImagePicker.xcodeproj/project.pbxproj index 93961568..851f2b60 100644 --- a/QBImagePicker.xcodeproj/project.pbxproj +++ b/QBImagePicker.xcodeproj/project.pbxproj @@ -15,8 +15,6 @@ AA21073D1AD15B74002B3E46 /* QBVideoIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2107371AD15B74002B3E46 /* QBVideoIndicatorView.m */; }; AA2A44AB1AD12F9B004CFDF6 /* QBImagePicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACD2EEE1AD12DB10029BE0B /* QBImagePicker.framework */; }; AA2A44AC1AD12F9B004CFDF6 /* QBImagePicker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AACD2EEE1AD12DB10029BE0B /* QBImagePicker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - AA45EF621AD14C97002B9B67 /* QBFooterView.h in Headers */ = {isa = PBXBuildFile; fileRef = AA45EF601AD14C97002B9B67 /* QBFooterView.h */; }; - AA45EF631AD14C97002B9B67 /* QBFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA45EF611AD14C97002B9B67 /* QBFooterView.m */; }; AA7444A41AD138A1006DE404 /* QBImagePicker.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA7444A31AD138A1006DE404 /* QBImagePicker.storyboard */; }; AA7444B31AD13948006DE404 /* QBAlbumCell.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7444A91AD13948006DE404 /* QBAlbumCell.h */; }; AA7444B41AD13948006DE404 /* QBAlbumCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AA7444AA1AD13948006DE404 /* QBAlbumCell.m */; }; @@ -86,8 +84,6 @@ AA2107351AD15B74002B3E46 /* QBVideoIconView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBVideoIconView.m; sourceTree = ""; }; AA2107361AD15B74002B3E46 /* QBVideoIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBVideoIndicatorView.h; sourceTree = ""; }; AA2107371AD15B74002B3E46 /* QBVideoIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBVideoIndicatorView.m; sourceTree = ""; }; - AA45EF601AD14C97002B9B67 /* QBFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBFooterView.h; sourceTree = ""; }; - AA45EF611AD14C97002B9B67 /* QBFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBFooterView.m; sourceTree = ""; }; AA7444A31AD138A1006DE404 /* QBImagePicker.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = QBImagePicker.storyboard; sourceTree = ""; }; AA7444A91AD13948006DE404 /* QBAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBAlbumCell.h; sourceTree = ""; }; AA7444AA1AD13948006DE404 /* QBAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBAlbumCell.m; sourceTree = ""; }; @@ -176,8 +172,6 @@ AA7444AA1AD13948006DE404 /* QBAlbumCell.m */, AA7444BD1AD14A5E006DE404 /* QBAssetCell.h */, AA7444BE1AD14A5E006DE404 /* QBAssetCell.m */, - AA45EF601AD14C97002B9B67 /* QBFooterView.h */, - AA45EF611AD14C97002B9B67 /* QBFooterView.m */, AA2107321AD15B74002B3E46 /* QBCheckmarkView.h */, AA2107331AD15B74002B3E46 /* QBCheckmarkView.m */, AA2107341AD15B74002B3E46 /* QBVideoIconView.h */, @@ -312,7 +306,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - AA45EF621AD14C97002B9B67 /* QBFooterView.h in Headers */, AA21073A1AD15B74002B3E46 /* QBVideoIconView.h in Headers */, AA7444C11AD14A5E006DE404 /* QBAssetCell.h in Headers */, AA7444B51AD13948006DE404 /* QBAlbumsViewController.h in Headers */, @@ -495,7 +488,6 @@ AA7444C41AD14A5E006DE404 /* QBAssetsViewController.m in Sources */, AA21073B1AD15B74002B3E46 /* QBVideoIconView.m in Sources */, AA7444B41AD13948006DE404 /* QBAlbumCell.m in Sources */, - AA45EF631AD14C97002B9B67 /* QBFooterView.m in Sources */, AA7444B61AD13948006DE404 /* QBAlbumsViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/QBImagePicker/QBAssetsViewController.m b/QBImagePicker/QBAssetsViewController.m index 488385cc..087498cd 100755 --- a/QBImagePicker/QBAssetsViewController.m +++ b/QBImagePicker/QBAssetsViewController.m @@ -11,7 +11,6 @@ // Views #import "QBAssetCell.h" -#import "QBFooterView.h" #import "QBVideoIndicatorView.h" // ViewControllers @@ -98,7 +97,7 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie self.indexPathForLastVisibleItem = [[self.collectionView indexPathsForVisibleItems] lastObject]; // Update layout - [self.collectionViewLayout invalidateLayout]; + [self.collectionView.collectionViewLayout invalidateLayout]; } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation @@ -113,7 +112,7 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id context) { @@ -339,9 +338,9 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { if (kind == UICollectionElementKindSectionFooter) { - QBFooterView *footerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter - withReuseIdentifier:@"FooterView" - forIndexPath:indexPath]; + UICollectionReusableView *footerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter + withReuseIdentifier:@"FooterView" + forIndexPath:indexPath]; // Number of assets UILabel *label = (UILabel *)[footerView viewWithTag:1]; diff --git a/QBImagePicker/QBFooterView.h b/QBImagePicker/QBFooterView.h deleted file mode 100755 index 1485e76b..00000000 --- a/QBImagePicker/QBFooterView.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// QBFooterView.h -// QBImagePicker -// -// Created by Katsuma Tanaka on 2015/04/06. -// Copyright (c) 2015 Katsuma Tanaka. All rights reserved. -// - -#import - -@interface QBFooterView : UICollectionReusableView - -@end diff --git a/QBImagePicker/QBFooterView.m b/QBImagePicker/QBFooterView.m deleted file mode 100755 index e39a4a07..00000000 --- a/QBImagePicker/QBFooterView.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// QBFooterView.m -// QBImagePicker -// -// Created by Katsuma Tanaka on 2015/04/06. -// Copyright (c) 2015 Katsuma Tanaka. All rights reserved. -// - -#import "QBFooterView.h" - -@implementation QBFooterView - -@end diff --git a/QBImagePicker/QBImagePicker.storyboard b/QBImagePicker/QBImagePicker.storyboard index 7ab11164..cfa91df3 100644 --- a/QBImagePicker/QBImagePicker.storyboard +++ b/QBImagePicker/QBImagePicker.storyboard @@ -59,13 +59,13 @@ @@ -241,14 +241,14 @@ - +