Skip to content

Commit

Permalink
Nicer example
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Apr 21, 2014
1 parent 97b9857 commit 7eb1d62
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
8 changes: 7 additions & 1 deletion Example/Example/ExampleViewController.m
@@ -1,6 +1,8 @@

#import "ExampleViewController.h"
#import <UICollectionViewLeftAlignedLayout.h>
#import <UIColor+FlatColors.h>
#import <UIFont+OpenSans.h>

static NSString * const kCellIdentifier = @"CellIdentifier";
static BOOL kShouldRefresh = NO;
Expand All @@ -27,6 +29,10 @@ - (void)viewDidLoad

self.view.backgroundColor = [UIColor whiteColor];

self.titleLabel.font = [UIFont openSansFontOfSize:self.titleLabel.font.pointSize];
self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
self.titleLabel.textColor = [UIColor flatBelizeHoleColor];

self.collectionView.dataSource = self;
self.collectionView.delegate = self;
self.collectionView.backgroundColor = [UIColor clearColor];
Expand Down Expand Up @@ -64,7 +70,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
{
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kCellIdentifier forIndexPath:indexPath];

cell.contentView.layer.borderColor = [UIColor blackColor].CGColor;
cell.contentView.layer.borderColor = [UIColor flatPeterRiverColor].CGColor;
cell.contentView.layer.borderWidth = 2;

return cell;
Expand Down
8 changes: 4 additions & 4 deletions Example/Example/ExampleViewController~iphone.xib
Expand Up @@ -16,14 +16,14 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Left Aligned UICollectionView Layout" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s7c-TM-Fdt">
<rect key="frame" x="0.0" y="0.0" width="320" height="77"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Left Aligned UICollectionView Layout" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="280" translatesAutoresizingMaskIntoConstraints="NO" id="s7c-TM-Fdt">
<rect key="frame" x="20" y="0.0" width="280" height="107"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<fontDescription key="fontDescription" type="system" pointSize="25"/>
<nil key="highlightedColor"/>
</label>
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" minimumZoomScale="0.0" maximumZoomScale="0.0" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="1dx-Ff-Vxw">
<rect key="frame" x="20" y="85" width="280" height="483"/>
<rect key="frame" x="20" y="115" width="280" height="453"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<collectionViewLayout key="collectionViewLayout" id="7bk-Y3-Kqi" customClass="UICollectionViewLeftAlignedLayout"/>
<cells/>
Expand Down
4 changes: 3 additions & 1 deletion Example/Podfile
@@ -1,5 +1,7 @@
platform :ios
platform :ios, "6.0"

target :Example do
pod 'UICollectionViewLeftAlignedLayout', :path => '../'
pod 'OpenSans'
pod 'UIColor+FlatColors'
end
8 changes: 7 additions & 1 deletion Example/Podfile.lock
@@ -1,14 +1,20 @@
PODS:
- OpenSans (1.0.0)
- UICollectionViewLeftAlignedLayout (0.0.1)
- UIColor+FlatColors (0.0.1)

DEPENDENCIES:
- OpenSans
- UICollectionViewLeftAlignedLayout (from `../`)
- UIColor+FlatColors

EXTERNAL SOURCES:
UICollectionViewLeftAlignedLayout:
:path: ../

SPEC CHECKSUMS:
UICollectionViewLeftAlignedLayout: 08325f5827f870a8ffe18d93e6cdb1fff0a40fbe
OpenSans: ba92552b9df0333c4f4dab5c0105f55594a6cf9c
UICollectionViewLeftAlignedLayout: 609b48228c055467613760b7f729aeb705b91c56
UIColor+FlatColors: 417fbe0894c1da0e7ab6505e1409a26052caa75f

COCOAPODS: 0.32.1

0 comments on commit 7eb1d62

Please sign in to comment.