Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nek023 committed Apr 5, 2015
1 parent 7f34c10 commit 3a77f2a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 44 deletions.
8 changes: 0 additions & 8 deletions QBImagePicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -86,8 +84,6 @@
AA2107351AD15B74002B3E46 /* QBVideoIconView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBVideoIconView.m; sourceTree = "<group>"; };
AA2107361AD15B74002B3E46 /* QBVideoIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBVideoIndicatorView.h; sourceTree = "<group>"; };
AA2107371AD15B74002B3E46 /* QBVideoIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBVideoIndicatorView.m; sourceTree = "<group>"; };
AA45EF601AD14C97002B9B67 /* QBFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBFooterView.h; sourceTree = "<group>"; };
AA45EF611AD14C97002B9B67 /* QBFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBFooterView.m; sourceTree = "<group>"; };
AA7444A31AD138A1006DE404 /* QBImagePicker.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = QBImagePicker.storyboard; sourceTree = "<group>"; };
AA7444A91AD13948006DE404 /* QBAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QBAlbumCell.h; sourceTree = "<group>"; };
AA7444AA1AD13948006DE404 /* QBAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QBAlbumCell.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 5 additions & 6 deletions QBImagePicker/QBAssetsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

// Views
#import "QBAssetCell.h"
#import "QBFooterView.h"
#import "QBVideoIndicatorView.h"

// ViewControllers
Expand Down Expand Up @@ -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
Expand All @@ -113,7 +112,7 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIVi
NSIndexPath *indexPath = [[self.collectionView indexPathsForVisibleItems] lastObject];

// Update layout
[self.collectionViewLayout invalidateLayout];
[self.collectionView.collectionViewLayout invalidateLayout];

// Restore scroll position
[coordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
Expand Down Expand Up @@ -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];
Expand Down
13 changes: 0 additions & 13 deletions QBImagePicker/QBFooterView.h

This file was deleted.

13 changes: 0 additions & 13 deletions QBImagePicker/QBFooterView.m

This file was deleted.

8 changes: 4 additions & 4 deletions QBImagePicker/QBImagePicker.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Album Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="tmU-WT-HVS">
<rect key="frame" x="102" y="22" width="465" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Number of Photos" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KSh-gM-21m">
<rect key="frame" x="102" y="46" width="465" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand Down Expand Up @@ -241,14 +241,14 @@
</connections>
</collectionViewCell>
</cells>
<collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="FooterView" id="SdV-e9-H2L" customClass="QBFooterView">
<collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="FooterView" id="SdV-e9-H2L">
<rect key="frame" x="0.0" y="146" width="600" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" tag="1" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Number of Photos and Videos" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fce-cq-W8k">
<rect key="frame" x="0.0" y="22" width="600" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand Down

0 comments on commit 3a77f2a

Please sign in to comment.