├── .gitignore ├── LICENSE ├── README.md ├── RGCardViewLayout.h ├── RGCardViewLayout.m ├── RGCardViewLayout.podspec ├── RGCardViewLayout.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── RGCardViewLayout.xccheckout ├── RGCardViewLayout ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── coffee_to_go-50.imageset │ │ ├── Contents.json │ │ └── coffee_to_go-50.png │ ├── documentary-50.imageset │ │ ├── Contents.json │ │ └── documentary-50.png │ ├── headphones-50.imageset │ │ ├── Contents.json │ │ └── headphones-50.png │ ├── i1.imageset │ │ ├── Contents.json │ │ └── i1.png │ ├── i2.imageset │ │ ├── Contents.json │ │ └── i2.png │ ├── i3.imageset │ │ ├── Contents.json │ │ └── i3.png │ ├── i4.imageset │ │ ├── Contents.json │ │ └── i4.png │ ├── i5.imageset │ │ ├── Contents.json │ │ └── i5.png │ ├── regular_biking-50.imageset │ │ ├── Contents.json │ │ └── regular_biking-50.png │ └── trophy-50.imageset │ │ ├── Contents.json │ │ └── trophy-50.png ├── Info.plist ├── RGCollectionViewCell.h ├── RGCollectionViewCell.m ├── ViewController.h ├── ViewController.m └── main.m ├── RGCardViewLayoutTests ├── Info.plist └── RGCardViewLayoutTests.m └── demo.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Build 5 | Build 6 | build 7 | DerivedData 8 | 9 | # Temp 10 | *~.nib 11 | *.swp 12 | 13 | # SVN 14 | .svn 15 | 16 | # XCode 17 | *.mode1v3 18 | *.mode2v3 19 | *.pbxuser 20 | *.perspectivev3 21 | *.xcuserdatad 22 | xcworkspace 23 | 24 | # Pods 25 | Pods/ 26 | 27 | # Others 28 | .uispec.app 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Robera Geleta. 2 | 3 | The MIT License (MIT) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RGCardViewLayout 2 | 3 | ![demo](demo.gif) 4 | 5 | [Watch it in action here](https://www.youtube.com/watch?v=g_NGIphyckQ&feature=youtu.be) 6 | This is a layout that clones the interaction of going through cities in the City Guide App. (this app is #3 for the top iOS app animations on the raywenderlich 7 | 8 | To use this simply drop it in as a class in the storyboard or nib when you create your collection view. or you can 9 | instantiate it in code and give it your collection view(via initWithFrame:collectionViewLayout: or just set the layout propery 10 | of the collection View. and you can use your collection View as you always do. 11 | 12 | One important this for this layout is that in the datasource protcol to specify the number of cards you must use 13 | numberOfSectionsInCollectionView: , and for collectionView:numberOfItemsInSection: you must always return 1. 14 | 15 | also note that the itemsize is computed by the layout to be "appropriate" to the size of the collection view 16 | itself so setting it won't do anything. 17 | 18 | Place the following line into your podfile to use RGCardViewLayout: pod 'RGCardViewLayout','1.0' 19 | -------------------------------------------------------------------------------- /RGCardViewLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // RGCardViewLayout.h 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RGCardViewLayout : UICollectionViewFlowLayout 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RGCardViewLayout.m: -------------------------------------------------------------------------------- 1 | // 2 | // RGCardViewLayout.m 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import "RGCardViewLayout.h" 10 | 11 | @implementation RGCardViewLayout 12 | { 13 | CGFloat previousOffset; 14 | NSIndexPath *mainIndexPath; 15 | NSIndexPath *movingInIndexPath; 16 | CGFloat difference; 17 | } 18 | 19 | - (void)prepareLayout 20 | { 21 | [self setupLayout]; 22 | [super prepareLayout]; 23 | } 24 | 25 | - (void)setupLayout 26 | { 27 | CGFloat inset = self.collectionView.bounds.size.width * (6/64.0f); 28 | inset = floor(inset); 29 | 30 | self.itemSize = CGSizeMake(self.collectionView.bounds.size.width - (2 *inset), self.collectionView.bounds.size.height * 3/4); 31 | self.sectionInset = UIEdgeInsetsMake(0,inset, 0,inset); 32 | self.scrollDirection = UICollectionViewScrollDirectionHorizontal; 33 | } 34 | 35 | - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath 36 | { 37 | UICollectionViewLayoutAttributes *attributes = [[super layoutAttributesForItemAtIndexPath:indexPath] copy]; 38 | [self applyTransformToLayoutAttributes:attributes]; 39 | 40 | return attributes; 41 | } 42 | 43 | // indicate that we want to redraw as we scroll 44 | - (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds { 45 | return YES; 46 | } 47 | 48 | - (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect 49 | { 50 | NSArray *attributesSuper = [super layoutAttributesForElementsInRect:rect]; 51 | NSArray *attributes = [[NSArray alloc] initWithArray:attributesSuper copyItems:YES]; 52 | 53 | NSArray *cellIndices = [self.collectionView indexPathsForVisibleItems]; 54 | if(cellIndices.count == 0 ) 55 | { 56 | return attributes; 57 | } 58 | else if (cellIndices.count == 1) 59 | { 60 | mainIndexPath = cellIndices.firstObject; 61 | movingInIndexPath = nil; 62 | } 63 | else if(cellIndices.count > 1) 64 | { 65 | NSIndexPath *firstIndexPath = cellIndices.firstObject; 66 | if(firstIndexPath == mainIndexPath) 67 | { 68 | movingInIndexPath = cellIndices[1]; 69 | } 70 | else 71 | { 72 | movingInIndexPath = cellIndices.firstObject; 73 | mainIndexPath = cellIndices[1]; 74 | } 75 | 76 | } 77 | 78 | difference = self.collectionView.contentOffset.x - previousOffset; 79 | 80 | previousOffset = self.collectionView.contentOffset.x; 81 | 82 | for (UICollectionViewLayoutAttributes *attribute in attributes) 83 | { 84 | [self applyTransformToLayoutAttributes:attribute]; 85 | } 86 | return attributes; 87 | } 88 | 89 | - (void)applyTransformToLayoutAttributes:(UICollectionViewLayoutAttributes *)attribute 90 | { 91 | if(attribute.indexPath.section == mainIndexPath.section) 92 | { 93 | UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:mainIndexPath]; 94 | attribute.transform3D = [self transformFromView:cell]; 95 | 96 | } 97 | else if (attribute.indexPath.section == movingInIndexPath.section) 98 | { 99 | UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:movingInIndexPath]; 100 | attribute.transform3D = [self transformFromView:cell]; 101 | } 102 | } 103 | 104 | 105 | #pragma mark - Logica 106 | - (CGFloat)baseOffsetForView:(UIView *)view 107 | { 108 | UICollectionViewCell *cell = (UICollectionViewCell *)view; 109 | CGFloat offset = ([self.collectionView indexPathForCell:cell].section) * self.collectionView.bounds.size.width; 110 | 111 | return offset; 112 | } 113 | 114 | - (CGFloat)heightOffsetForView:(UIView *)view 115 | { 116 | CGFloat height; 117 | CGFloat baseOffsetForCurrentView = [self baseOffsetForView:view ]; 118 | CGFloat currentOffset = self.collectionView.contentOffset.x; 119 | CGFloat scrollViewWidth = self.collectionView.bounds.size.width; 120 | //TODO:make this constant a certain proportion of the collection view 121 | height = 120 * (currentOffset - baseOffsetForCurrentView)/scrollViewWidth; 122 | if(height < 0 ) 123 | { 124 | height = - 1 * height; 125 | } 126 | return height; 127 | } 128 | 129 | - (CGFloat)angleForView:(UIView *)view 130 | { 131 | CGFloat baseOffsetForCurrentView = [self baseOffsetForView:view ]; 132 | CGFloat currentOffset = self.collectionView.contentOffset.x; 133 | CGFloat scrollViewWidth = self.collectionView.bounds.size.width; 134 | CGFloat angle = (currentOffset - baseOffsetForCurrentView)/scrollViewWidth; 135 | return angle; 136 | } 137 | 138 | - (BOOL)xAxisForView:(UIView *)view 139 | { 140 | CGFloat baseOffsetForCurrentView = [self baseOffsetForView:view ]; 141 | CGFloat currentOffset = self.collectionView.contentOffset.x; 142 | CGFloat offset = (currentOffset - baseOffsetForCurrentView); 143 | if(offset >= 0) 144 | { 145 | return YES; 146 | } 147 | return NO; 148 | } 149 | 150 | 151 | #pragma mark - Transform Related Calculation 152 | 153 | - (CATransform3D)transformFromView:(UIView *)view 154 | { 155 | CGFloat angle = [self angleForView:view]; 156 | CGFloat height = [self heightOffsetForView:view]; 157 | BOOL xAxis = [self xAxisForView:view]; 158 | return [self transformfromAngle:angle height:height xAxis:xAxis]; 159 | } 160 | 161 | - (CATransform3D)transformfromAngle:(CGFloat)angle height:(CGFloat)height xAxis:(BOOL)axis 162 | { 163 | CATransform3D t = CATransform3DIdentity; 164 | t.m34 = 1.0/-500; 165 | 166 | if (axis) 167 | { 168 | t = CATransform3DRotate(t,angle, 1, 1, 0); 169 | } 170 | else 171 | { 172 | t = CATransform3DRotate(t,angle, -1, 1, 0); 173 | } 174 | 175 | return t; 176 | } 177 | 178 | @end 179 | 180 | -------------------------------------------------------------------------------- /RGCardViewLayout.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "RGCardViewLayout" 4 | s.version = "1.0" 5 | s.summary = "Collection view card layout." 6 | s.description = "This is a layout that clones the interaction of going through city \"cards\" in the City Guide App. (this app is #3 for the top iOS app animations on the raywenderlich)." 7 | 8 | s.author = "Robera Geleta" 9 | s.license = {:type => 'MIT', :file => 'LICENSE'} 10 | s.homepage = "https://github.com/terminatorover/RGCardViewLayout" 11 | 12 | s.platform = :ios, "6.0" 13 | s.requires_arc = true 14 | s.source = { :git => "https://github.com/terminatorover/RGCardViewLayout.git", :tag => "v1.0" } 15 | s.frameworks = "UIKit", "Foundation", "CoreGraphics" 16 | s.source_files = "RGCardViewLayout.{h,m}" 17 | s.public_header_files = "RGCardViewLayout.h" 18 | s.requires_arc = true 19 | end 20 | -------------------------------------------------------------------------------- /RGCardViewLayout.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A128C7EB1A734A9800C75B99 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C7EA1A734A9800C75B99 /* main.m */; }; 11 | A128C7EE1A734A9800C75B99 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C7ED1A734A9800C75B99 /* AppDelegate.m */; }; 12 | A128C7F11A734A9800C75B99 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C7F01A734A9800C75B99 /* ViewController.m */; }; 13 | A128C7F41A734A9800C75B99 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A128C7F21A734A9800C75B99 /* Main.storyboard */; }; 14 | A128C7F61A734A9800C75B99 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A128C7F51A734A9800C75B99 /* Images.xcassets */; }; 15 | A128C7F91A734A9800C75B99 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A128C7F71A734A9800C75B99 /* LaunchScreen.xib */; }; 16 | A128C8051A734A9800C75B99 /* RGCardViewLayoutTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C8041A734A9800C75B99 /* RGCardViewLayoutTests.m */; }; 17 | A128C8101A734AAC00C75B99 /* RGCardViewLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C80F1A734AAC00C75B99 /* RGCardViewLayout.m */; }; 18 | A128C8131A73642A00C75B99 /* RGCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A128C8121A73642A00C75B99 /* RGCollectionViewCell.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | A128C7FF1A734A9800C75B99 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = A128C7DD1A734A9800C75B99 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = A128C7E41A734A9800C75B99; 27 | remoteInfo = RGCardViewLayout; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | A128C7E51A734A9800C75B99 /* RGCardViewLayout.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RGCardViewLayout.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | A128C7E91A734A9800C75B99 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | A128C7EA1A734A9800C75B99 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | A128C7EC1A734A9800C75B99 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | A128C7ED1A734A9800C75B99 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | A128C7EF1A734A9800C75B99 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 38 | A128C7F01A734A9800C75B99 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 39 | A128C7F31A734A9800C75B99 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | A128C7F51A734A9800C75B99 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | A128C7F81A734A9800C75B99 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | A128C7FE1A734A9800C75B99 /* RGCardViewLayoutTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RGCardViewLayoutTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | A128C8031A734A9800C75B99 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | A128C8041A734A9800C75B99 /* RGCardViewLayoutTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RGCardViewLayoutTests.m; sourceTree = ""; }; 45 | A128C80E1A734AAC00C75B99 /* RGCardViewLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGCardViewLayout.h; sourceTree = SOURCE_ROOT; }; 46 | A128C80F1A734AAC00C75B99 /* RGCardViewLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RGCardViewLayout.m; sourceTree = SOURCE_ROOT; }; 47 | A128C8111A73642A00C75B99 /* RGCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGCollectionViewCell.h; sourceTree = ""; }; 48 | A128C8121A73642A00C75B99 /* RGCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RGCollectionViewCell.m; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | A128C7E21A734A9800C75B99 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | A128C7FB1A734A9800C75B99 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | A128C7DC1A734A9800C75B99 = { 70 | isa = PBXGroup; 71 | children = ( 72 | A128C7E71A734A9800C75B99 /* RGCardViewLayout */, 73 | A128C8011A734A9800C75B99 /* RGCardViewLayoutTests */, 74 | A128C7E61A734A9800C75B99 /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | A128C7E61A734A9800C75B99 /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | A128C7E51A734A9800C75B99 /* RGCardViewLayout.app */, 82 | A128C7FE1A734A9800C75B99 /* RGCardViewLayoutTests.xctest */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | A128C7E71A734A9800C75B99 /* RGCardViewLayout */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | A128C7EC1A734A9800C75B99 /* AppDelegate.h */, 91 | A128C7ED1A734A9800C75B99 /* AppDelegate.m */, 92 | A128C7EF1A734A9800C75B99 /* ViewController.h */, 93 | A128C7F01A734A9800C75B99 /* ViewController.m */, 94 | A128C80E1A734AAC00C75B99 /* RGCardViewLayout.h */, 95 | A128C80F1A734AAC00C75B99 /* RGCardViewLayout.m */, 96 | A128C7F21A734A9800C75B99 /* Main.storyboard */, 97 | A128C8111A73642A00C75B99 /* RGCollectionViewCell.h */, 98 | A128C8121A73642A00C75B99 /* RGCollectionViewCell.m */, 99 | A128C7F51A734A9800C75B99 /* Images.xcassets */, 100 | A128C7F71A734A9800C75B99 /* LaunchScreen.xib */, 101 | A128C7E81A734A9800C75B99 /* Supporting Files */, 102 | ); 103 | path = RGCardViewLayout; 104 | sourceTree = ""; 105 | }; 106 | A128C7E81A734A9800C75B99 /* Supporting Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | A128C7E91A734A9800C75B99 /* Info.plist */, 110 | A128C7EA1A734A9800C75B99 /* main.m */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | A128C8011A734A9800C75B99 /* RGCardViewLayoutTests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | A128C8041A734A9800C75B99 /* RGCardViewLayoutTests.m */, 119 | A128C8021A734A9800C75B99 /* Supporting Files */, 120 | ); 121 | path = RGCardViewLayoutTests; 122 | sourceTree = ""; 123 | }; 124 | A128C8021A734A9800C75B99 /* Supporting Files */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | A128C8031A734A9800C75B99 /* Info.plist */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | A128C7E41A734A9800C75B99 /* RGCardViewLayout */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = A128C8081A734A9800C75B99 /* Build configuration list for PBXNativeTarget "RGCardViewLayout" */; 138 | buildPhases = ( 139 | A128C7E11A734A9800C75B99 /* Sources */, 140 | A128C7E21A734A9800C75B99 /* Frameworks */, 141 | A128C7E31A734A9800C75B99 /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = RGCardViewLayout; 148 | productName = RGCardViewLayout; 149 | productReference = A128C7E51A734A9800C75B99 /* RGCardViewLayout.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | A128C7FD1A734A9800C75B99 /* RGCardViewLayoutTests */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = A128C80B1A734A9800C75B99 /* Build configuration list for PBXNativeTarget "RGCardViewLayoutTests" */; 155 | buildPhases = ( 156 | A128C7FA1A734A9800C75B99 /* Sources */, 157 | A128C7FB1A734A9800C75B99 /* Frameworks */, 158 | A128C7FC1A734A9800C75B99 /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | A128C8001A734A9800C75B99 /* PBXTargetDependency */, 164 | ); 165 | name = RGCardViewLayoutTests; 166 | productName = RGCardViewLayoutTests; 167 | productReference = A128C7FE1A734A9800C75B99 /* RGCardViewLayoutTests.xctest */; 168 | productType = "com.apple.product-type.bundle.unit-test"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | A128C7DD1A734A9800C75B99 /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastUpgradeCheck = 0610; 177 | ORGANIZATIONNAME = "ROBERA GELETA"; 178 | TargetAttributes = { 179 | A128C7E41A734A9800C75B99 = { 180 | CreatedOnToolsVersion = 6.1.1; 181 | }; 182 | A128C7FD1A734A9800C75B99 = { 183 | CreatedOnToolsVersion = 6.1.1; 184 | TestTargetID = A128C7E41A734A9800C75B99; 185 | }; 186 | }; 187 | }; 188 | buildConfigurationList = A128C7E01A734A9800C75B99 /* Build configuration list for PBXProject "RGCardViewLayout" */; 189 | compatibilityVersion = "Xcode 3.2"; 190 | developmentRegion = English; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = A128C7DC1A734A9800C75B99; 197 | productRefGroup = A128C7E61A734A9800C75B99 /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | A128C7E41A734A9800C75B99 /* RGCardViewLayout */, 202 | A128C7FD1A734A9800C75B99 /* RGCardViewLayoutTests */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | A128C7E31A734A9800C75B99 /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | A128C7F41A734A9800C75B99 /* Main.storyboard in Resources */, 213 | A128C7F91A734A9800C75B99 /* LaunchScreen.xib in Resources */, 214 | A128C7F61A734A9800C75B99 /* Images.xcassets in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | A128C7FC1A734A9800C75B99 /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | A128C7E11A734A9800C75B99 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | A128C8131A73642A00C75B99 /* RGCollectionViewCell.m in Sources */, 233 | A128C7F11A734A9800C75B99 /* ViewController.m in Sources */, 234 | A128C8101A734AAC00C75B99 /* RGCardViewLayout.m in Sources */, 235 | A128C7EE1A734A9800C75B99 /* AppDelegate.m in Sources */, 236 | A128C7EB1A734A9800C75B99 /* main.m in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | A128C7FA1A734A9800C75B99 /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | A128C8051A734A9800C75B99 /* RGCardViewLayoutTests.m in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | /* End PBXSourcesBuildPhase section */ 249 | 250 | /* Begin PBXTargetDependency section */ 251 | A128C8001A734A9800C75B99 /* PBXTargetDependency */ = { 252 | isa = PBXTargetDependency; 253 | target = A128C7E41A734A9800C75B99 /* RGCardViewLayout */; 254 | targetProxy = A128C7FF1A734A9800C75B99 /* PBXContainerItemProxy */; 255 | }; 256 | /* End PBXTargetDependency section */ 257 | 258 | /* Begin PBXVariantGroup section */ 259 | A128C7F21A734A9800C75B99 /* Main.storyboard */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | A128C7F31A734A9800C75B99 /* Base */, 263 | ); 264 | name = Main.storyboard; 265 | sourceTree = ""; 266 | }; 267 | A128C7F71A734A9800C75B99 /* LaunchScreen.xib */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | A128C7F81A734A9800C75B99 /* Base */, 271 | ); 272 | name = LaunchScreen.xib; 273 | sourceTree = ""; 274 | }; 275 | /* End PBXVariantGroup section */ 276 | 277 | /* Begin XCBuildConfiguration section */ 278 | A128C8061A734A9800C75B99 /* Debug */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 283 | CLANG_CXX_LIBRARY = "libc++"; 284 | CLANG_ENABLE_MODULES = YES; 285 | CLANG_ENABLE_OBJC_ARC = YES; 286 | CLANG_WARN_BOOL_CONVERSION = YES; 287 | CLANG_WARN_CONSTANT_CONVERSION = YES; 288 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 289 | CLANG_WARN_EMPTY_BODY = YES; 290 | CLANG_WARN_ENUM_CONVERSION = YES; 291 | CLANG_WARN_INT_CONVERSION = YES; 292 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 293 | CLANG_WARN_UNREACHABLE_CODE = YES; 294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 295 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 296 | COPY_PHASE_STRIP = NO; 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_OPTIMIZATION_LEVEL = 0; 301 | GCC_PREPROCESSOR_DEFINITIONS = ( 302 | "DEBUG=1", 303 | "$(inherited)", 304 | ); 305 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | }; 317 | name = Debug; 318 | }; 319 | A128C8071A734A9800C75B99 /* Release */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BOOL_CONVERSION = YES; 328 | CLANG_WARN_CONSTANT_CONVERSION = YES; 329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 330 | CLANG_WARN_EMPTY_BODY = YES; 331 | CLANG_WARN_ENUM_CONVERSION = YES; 332 | CLANG_WARN_INT_CONVERSION = YES; 333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 334 | CLANG_WARN_UNREACHABLE_CODE = YES; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = YES; 338 | ENABLE_NS_ASSERTIONS = NO; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu99; 341 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 342 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 343 | GCC_WARN_UNDECLARED_SELECTOR = YES; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 345 | GCC_WARN_UNUSED_FUNCTION = YES; 346 | GCC_WARN_UNUSED_VARIABLE = YES; 347 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 348 | MTL_ENABLE_DEBUG_INFO = NO; 349 | SDKROOT = iphoneos; 350 | VALIDATE_PRODUCT = YES; 351 | }; 352 | name = Release; 353 | }; 354 | A128C8091A734A9800C75B99 /* Debug */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 358 | INFOPLIST_FILE = RGCardViewLayout/Info.plist; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 360 | PRODUCT_NAME = "$(TARGET_NAME)"; 361 | }; 362 | name = Debug; 363 | }; 364 | A128C80A1A734A9800C75B99 /* Release */ = { 365 | isa = XCBuildConfiguration; 366 | buildSettings = { 367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 368 | INFOPLIST_FILE = RGCardViewLayout/Info.plist; 369 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 370 | PRODUCT_NAME = "$(TARGET_NAME)"; 371 | }; 372 | name = Release; 373 | }; 374 | A128C80C1A734A9800C75B99 /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | BUNDLE_LOADER = "$(TEST_HOST)"; 378 | FRAMEWORK_SEARCH_PATHS = ( 379 | "$(SDKROOT)/Developer/Library/Frameworks", 380 | "$(inherited)", 381 | ); 382 | GCC_PREPROCESSOR_DEFINITIONS = ( 383 | "DEBUG=1", 384 | "$(inherited)", 385 | ); 386 | INFOPLIST_FILE = RGCardViewLayoutTests/Info.plist; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RGCardViewLayout.app/RGCardViewLayout"; 390 | }; 391 | name = Debug; 392 | }; 393 | A128C80D1A734A9800C75B99 /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | BUNDLE_LOADER = "$(TEST_HOST)"; 397 | FRAMEWORK_SEARCH_PATHS = ( 398 | "$(SDKROOT)/Developer/Library/Frameworks", 399 | "$(inherited)", 400 | ); 401 | INFOPLIST_FILE = RGCardViewLayoutTests/Info.plist; 402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 403 | PRODUCT_NAME = "$(TARGET_NAME)"; 404 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RGCardViewLayout.app/RGCardViewLayout"; 405 | }; 406 | name = Release; 407 | }; 408 | /* End XCBuildConfiguration section */ 409 | 410 | /* Begin XCConfigurationList section */ 411 | A128C7E01A734A9800C75B99 /* Build configuration list for PBXProject "RGCardViewLayout" */ = { 412 | isa = XCConfigurationList; 413 | buildConfigurations = ( 414 | A128C8061A734A9800C75B99 /* Debug */, 415 | A128C8071A734A9800C75B99 /* Release */, 416 | ); 417 | defaultConfigurationIsVisible = 0; 418 | defaultConfigurationName = Release; 419 | }; 420 | A128C8081A734A9800C75B99 /* Build configuration list for PBXNativeTarget "RGCardViewLayout" */ = { 421 | isa = XCConfigurationList; 422 | buildConfigurations = ( 423 | A128C8091A734A9800C75B99 /* Debug */, 424 | A128C80A1A734A9800C75B99 /* Release */, 425 | ); 426 | defaultConfigurationIsVisible = 0; 427 | defaultConfigurationName = Release; 428 | }; 429 | A128C80B1A734A9800C75B99 /* Build configuration list for PBXNativeTarget "RGCardViewLayoutTests" */ = { 430 | isa = XCConfigurationList; 431 | buildConfigurations = ( 432 | A128C80C1A734A9800C75B99 /* Debug */, 433 | A128C80D1A734A9800C75B99 /* Release */, 434 | ); 435 | defaultConfigurationIsVisible = 0; 436 | defaultConfigurationName = Release; 437 | }; 438 | /* End XCConfigurationList section */ 439 | }; 440 | rootObject = A128C7DD1A734A9800C75B99 /* Project object */; 441 | } 442 | -------------------------------------------------------------------------------- /RGCardViewLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RGCardViewLayout.xcodeproj/project.xcworkspace/xcshareddata/RGCardViewLayout.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | B93D1E18-79D0-46A9-B3C8-C45051BB444E 9 | IDESourceControlProjectName 10 | RGCardViewLayout 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 30199E033BC008EB0ADEC7E1B323C3A51FB3168F 14 | https://github.com/terminatorover/RGCardViewLayout.git 15 | 16 | IDESourceControlProjectPath 17 | RGCardViewLayout.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 30199E033BC008EB0ADEC7E1B323C3A51FB3168F 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/terminatorover/RGCardViewLayout.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 30199E033BC008EB0ADEC7E1B323C3A51FB3168F 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 30199E033BC008EB0ADEC7E1B323C3A51FB3168F 36 | IDESourceControlWCCName 37 | RGCardViewLayout 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RGCardViewLayout/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /RGCardViewLayout/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | return YES; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /RGCardViewLayout/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RGCardViewLayout/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 69 | 70 | 71 | 72 | 78 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 124 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/coffee_to_go-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "coffee_to_go-50.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/coffee_to_go-50.imageset/coffee_to_go-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/coffee_to_go-50.imageset/coffee_to_go-50.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/documentary-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "documentary-50.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/documentary-50.imageset/documentary-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/documentary-50.imageset/documentary-50.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/headphones-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "headphones-50.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/headphones-50.imageset/headphones-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/headphones-50.imageset/headphones-50.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "i1.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i1.imageset/i1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/i1.imageset/i1.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "i2.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i2.imageset/i2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/i2.imageset/i2.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "i3.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i3.imageset/i3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/i3.imageset/i3.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "i4.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i4.imageset/i4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/i4.imageset/i4.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "i5.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/i5.imageset/i5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/i5.imageset/i5.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/regular_biking-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "regular_biking-50.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/regular_biking-50.imageset/regular_biking-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/regular_biking-50.imageset/regular_biking-50.png -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/trophy-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "trophy-50.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /RGCardViewLayout/Images.xcassets/trophy-50.imageset/trophy-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/RGCardViewLayout/Images.xcassets/trophy-50.imageset/trophy-50.png -------------------------------------------------------------------------------- /RGCardViewLayout/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | EnterWithBoldness.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /RGCardViewLayout/RGCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // RGCollectionViewCell.h 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RGCollectionViewCell : UICollectionViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | @property (weak, nonatomic) IBOutlet UILabel *mainLabel; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /RGCardViewLayout/RGCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // RGCollectionViewCell.m 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import "RGCollectionViewCell.h" 10 | 11 | @implementation RGCollectionViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /RGCardViewLayout/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /RGCardViewLayout/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | #define TAG 99 9 | 10 | #import "ViewController.h" 11 | #import "RGCollectionViewCell.h" 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 19 | { 20 | return 1; 21 | } 22 | 23 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView 24 | { 25 | return 4; 26 | } 27 | 28 | -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 29 | { 30 | RGCollectionViewCell *cell = (RGCollectionViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:@"reuse" forIndexPath:indexPath]; 31 | [self configureCell:cell withIndexPath:indexPath]; 32 | return cell; 33 | } 34 | 35 | - (void)configureCell:(RGCollectionViewCell *)cell withIndexPath:(NSIndexPath *)indexPath 36 | { 37 | UIView *subview = [cell.contentView viewWithTag:TAG]; 38 | [subview removeFromSuperview]; 39 | 40 | switch (indexPath.section) { 41 | case 0: 42 | cell.imageView.image = [UIImage imageNamed:@"i1"]; 43 | cell.mainLabel.text = @"Glaciers"; 44 | break; 45 | case 1: 46 | cell.imageView.image = [UIImage imageNamed:@"i2"]; 47 | cell.mainLabel.text = @"Parrots"; 48 | break; 49 | case 2: 50 | cell.imageView.image = [UIImage imageNamed:@"i3"]; 51 | cell.mainLabel.text = @"Whales"; 52 | break; 53 | case 3: 54 | cell.imageView.image = [UIImage imageNamed:@"i4"]; 55 | cell.mainLabel.text = @"Lake View"; 56 | break; 57 | case 4: 58 | cell.imageView.image = [UIImage imageNamed:@"i5"]; 59 | break; 60 | default: 61 | break; 62 | } 63 | } 64 | 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /RGCardViewLayout/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RGCardViewLayout 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RGCardViewLayoutTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | EnterWithBoldness.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RGCardViewLayoutTests/RGCardViewLayoutTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // RGCardViewLayoutTests.m 3 | // RGCardViewLayoutTests 4 | // 5 | // Created by ROBERA GELETA on 1/23/15. 6 | // Copyright (c) 2015 ROBERA GELETA. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface RGCardViewLayoutTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation RGCardViewLayoutTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/terminatorover/RGCardViewLayout/25e688477c5b7975b4f44f6b0f0191757f4fc1c2/demo.gif --------------------------------------------------------------------------------