[
  {
    "path": ".gitignore",
    "content": "# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\n\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control\n#\n#Pods/\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/Classes/KYTilePhotoLayout.h",
    "content": "//\n//  KYTilePhotoLayout.h\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n\n#import <UIKit/UIKit.h>\n\ntypedef enum : NSUInteger {\n    Vertical, // 0\n    Horizontal, // 1\n} KYTilePhotoLayoutDirection;\n\nIB_DESIGNABLE\n@interface KYTilePhotoLayout : UICollectionViewLayout\n\n//** The number of column when device orientation is portrait\n//** 设备竖直时候的列数\n@property(nonatomic,assign)IBInspectable NSUInteger ColOfPortrait;\n\n//** The number of column when device orientation is landscape\n//** 设备水平时候的列数\n@property(nonatomic,assign)IBInspectable NSUInteger ColOfLandscape;\n\n//** The threshold of double-colume.It's between 0~100.eg,you set DoubleColumnThreshold to 40,it means you will have 40 percent possibility have a double-column-width/height column.\n//** 横跨双列出现概率的阈值。比如你指定 DoubleColumnThreshold 为40，那么将会有40%的可能性出现双列宽度或高度的列。\n@property(nonatomic,assign)IBInspectable NSUInteger DoubleColumnThreshold;\n\n//** The scroll direction of layout\n//** 布局的滚动方向\n@property(nonatomic,assign)IBInspectable KYTilePhotoLayoutDirection LayoutDirection;\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/Classes/KYTilePhotoLayout.m",
    "content": "//\n//  KYTilePhotoLayout.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import \"KYTilePhotoLayout.h\"\n\n\n\n\n#define LayoutHorizontal self.LayoutDirection == Horizontal\n#define LayoutVertical   self.LayoutDirection == Vertical\n\n\n@interface KYTilePhotoLayout()\n\n@property (nonatomic,assign)NSUInteger columnsCount;\n@property (nonatomic,strong)NSMutableArray *COLUMNSHEIGHTS;//保存所有列高度的数组\n@property (nonatomic,strong)NSMutableArray *itemsAttributes;//保存所有列高度的数组\n\n@end\n\n@implementation KYTilePhotoLayout\n\n#pragma mark --  UICollectionViewLayout\n\n\n-(void)prepareLayout{\n    \n    \n    //根据屏幕方向确定总共需要的列数\n    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];\n    if (orientation == UIDeviceOrientationLandscapeLeft | orientation ==  UIDeviceOrientationLandscapeRight){\n        self.columnsCount = self.ColOfLandscape;\n    }else{\n        self.columnsCount = self.ColOfPortrait;\n    }\n    \n    //确定所有item的个数\n    NSUInteger itemCounts = [[self collectionView]numberOfItemsInSection:0];\n    //初始化保存所有item attributes的数组\n    self.itemsAttributes = [NSMutableArray arrayWithCapacity:itemCounts];\n    \n    //根据列数确定存储列高度的数组容量，全部置0\n    self.COLUMNSHEIGHTS = [NSMutableArray arrayWithCapacity:self.columnsCount];\n    for (NSInteger i = 0; i<self.columnsCount; i++) {\n        [self.COLUMNSHEIGHTS addObject:@(0)];\n    }\n    \n    \n    for (NSUInteger i = 0; i < itemCounts; i++) {\n        //找到最短列\n        NSUInteger shtIndex = [self findShortestColumn];\n        \n        //x -- 尽可能用整数\n        NSUInteger origin_x = LayoutVertical ? shtIndex * [self columnWidth] : [self.COLUMNSHEIGHTS[shtIndex] integerValue];\n        //y\n        NSUInteger origin_y = LayoutVertical ? [self.COLUMNSHEIGHTS[shtIndex] integerValue] : shtIndex * [self columnWidth];\n        \n        //width\n        NSUInteger size_width = 0.0;\n        NSUInteger randomOfWhetherDouble = arc4random() % 100;//随机数标记是否要双行\n        \n        //如果当前列不是最后一列 && 当前列高度和后一列高度相等 && 达到跨行阈值\n        if (shtIndex < self.columnsCount - 1 && [self.COLUMNSHEIGHTS[shtIndex] floatValue] == [self.COLUMNSHEIGHTS[shtIndex+1] floatValue] && randomOfWhetherDouble < self.DoubleColumnThreshold) {\n            \n            size_width = 2*[self columnWidth];\n            \n        }else{\n            \n            size_width = [self columnWidth];\n        }\n        \n        //height\n        NSUInteger size_height = 0.0;\n        CGFloat retVal;\n        if (size_width == 2*[self columnWidth]) {\n            \n            float extraRandomHeight = arc4random() % 25;\n            retVal = 0.75 + (extraRandomHeight / 100);\n            \n            size_height = size_width * retVal; // 高度为宽度的0.75~1.0倍\n            size_height = size_height - (size_height % 40);\n                        \n        }else{\n            \n            \n            float extraRandomHeight = arc4random() % 50;\n            retVal = 0.75 + (extraRandomHeight / 100);\n            size_height = size_width * retVal; // 高度为宽度的0.75~1.25倍\n            size_height = size_height - (size_height % 40);\n\n        }\n        \n        \n        //如果是Horizontal,宽高互换。最后别忘了刷新高度栈\n        if (LayoutHorizontal) {\n            \n            NSUInteger temp = size_width;\n            size_width = size_height;\n            size_height = temp;\n            \n            if (size_height == 2*[self columnWidth]) {\n                \n                self.COLUMNSHEIGHTS[shtIndex] = @(origin_x + size_width);\n                self.COLUMNSHEIGHTS[shtIndex+1] = @(origin_x + size_width);\n                \n            }else{\n                \n                self.COLUMNSHEIGHTS[shtIndex] = @(origin_x + size_width);\n                \n            }\n            \n        }else{\n            \n            if (size_width == 2*[self columnWidth]) {\n                \n                self.COLUMNSHEIGHTS[shtIndex] = @(origin_y + size_height);\n                self.COLUMNSHEIGHTS[shtIndex+1] = @(origin_y + size_height);\n                \n            }else{\n                \n                self.COLUMNSHEIGHTS[shtIndex] = @(origin_y + size_height);\n                \n            }\n            \n        }\n        \n        \n\n        //给attributes.frame 赋值，并存入 self.itemsAttributes\n        NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:0];\n        UICollectionViewLayoutAttributes *attributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];\n        attributes.frame = CGRectMake(origin_x, origin_y, size_width, size_height);\n        [self.itemsAttributes addObject:attributes];\n        \n    }\n    \n    \n    \n}\n\n\n- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect{\n    \n    \n    return self.itemsAttributes;\n    \n}\n\n\n-(CGSize)collectionViewContentSize{\n\n    CGSize size = self.collectionView.bounds.size;\n    NSUInteger longstIndex = [self findLongestColumn];\n    float columnMax = [self.COLUMNSHEIGHTS[longstIndex] floatValue];\n    if (LayoutVertical) {\n        size.height = columnMax;\n    }else{\n        size.width  = columnMax;\n    }\n    \n    return size;\n}\n\n\n\n#pragma mark -- Public Method\n\n//均分的宽度,注意：四舍五入成整数\n- (float)columnWidth{\n    \n    return LayoutVertical ? roundf(self.collectionView.bounds.size.width / self.columnsCount) : roundf(self.collectionView.bounds.size.height / self.columnsCount);\n    \n}\n\n//寻找此时高度最短的列.第一列为0\n-(NSUInteger)findShortestColumn{\n\n    NSUInteger shortestIndex = 0;\n    CGFloat shortestValue = MAXFLOAT;\n    \n\n    NSUInteger index=0;//游标\n    for (NSNumber *columnHeight in self.COLUMNSHEIGHTS) {\n        if ([columnHeight floatValue] < shortestValue) {\n            shortestValue = [columnHeight floatValue];\n            shortestIndex = index;\n        }\n        index++;\n    }\n    \n    return shortestIndex;\n    \n}\n\n\n//寻找此时高度最长的列.第一列为0\n-(NSUInteger)findLongestColumn{\n    NSUInteger longestIndex = 0;\n    CGFloat longestValue = 0;\n    \n    \n    NSUInteger index=0;//游标\n    for (NSNumber *columnHeight in self.COLUMNSHEIGHTS) {\n        if ([columnHeight floatValue] > longestValue) {\n            longestValue = [columnHeight floatValue];\n            longestIndex = index;\n        }\n        index++;\n    }\n    \n    return longestIndex;\n\n}\n\n\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/AppDelegate.h",
    "content": "//\n//  AppDelegate.h\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/AppDelegate.m",
    "content": "//\n//  AppDelegate.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    // Override point for customization after application launch.\n    return YES;\n}\n\n- (void)applicationWillResignActive:(UIApplication *)application {\n    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.\n}\n\n- (void)applicationDidEnterBackground:(UIApplication *)application {\n    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n}\n\n- (void)applicationWillEnterForeground:(UIApplication *)application {\n    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.\n}\n\n- (void)applicationDidBecomeActive:(UIApplication *)application {\n    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n}\n\n- (void)applicationWillTerminate:(UIApplication *)application {\n    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n}\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/Base.lproj/LaunchScreen.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"6214\" systemVersion=\"14A314h\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6207\"/>\n        <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"  Copyright (c) 2015 Kitten Yang. All rights reserved.\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">\n                    <rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"KYTilePhotoLayout-Demo\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">\n                    <rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>\n                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n            </subviews>\n            <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n            <constraints>\n                <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"5cJ-9S-tgC\"/>\n                <constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>\n                <constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>\n                <constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>\n                <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>\n            </constraints>\n            <nil key=\"simulatedStatusBarMetrics\"/>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <point key=\"canvasLocation\" x=\"548\" y=\"455\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"7531\" systemVersion=\"14E26a\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"7520\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aUi-mz-x7i\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                                <collectionViewFlowLayout key=\"collectionViewLayout\" minimumLineSpacing=\"10\" minimumInteritemSpacing=\"10\" id=\"fa3-m1-QfY\" customClass=\"KYTilePhotoLayout\">\n                                    <size key=\"itemSize\" width=\"121\" height=\"126\"/>\n                                    <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                    <userDefinedRuntimeAttributes>\n                                        <userDefinedRuntimeAttribute type=\"number\" keyPath=\"ColOfPortrait\">\n                                            <integer key=\"value\" value=\"3\"/>\n                                        </userDefinedRuntimeAttribute>\n                                        <userDefinedRuntimeAttribute type=\"number\" keyPath=\"ColOfLandscape\">\n                                            <integer key=\"value\" value=\"3\"/>\n                                        </userDefinedRuntimeAttribute>\n                                        <userDefinedRuntimeAttribute type=\"number\" keyPath=\"DoubleColumnThreshold\">\n                                            <integer key=\"value\" value=\"40\"/>\n                                        </userDefinedRuntimeAttribute>\n                                        <userDefinedRuntimeAttribute type=\"number\" keyPath=\"LayoutDirection\">\n                                            <integer key=\"value\" value=\"0\"/>\n                                        </userDefinedRuntimeAttribute>\n                                    </userDefinedRuntimeAttributes>\n                                </collectionViewFlowLayout>\n                                <cells>\n                                    <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"KYTilePhotoCell\" id=\"eRN-l2-fQC\" customClass=\"KYTilePhotoCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"50\" height=\"50\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"121\" height=\"126\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aE6-mq-Y7V\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"121\" height=\"126\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"23\"/>\n                                                    <color key=\"textColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                            <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                                        </view>\n                                        <constraints>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"aE6-mq-Y7V\" secondAttribute=\"trailing\" id=\"1cb-JT-mxO\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"aE6-mq-Y7V\" secondAttribute=\"bottom\" id=\"38c-aQ-csi\"/>\n                                            <constraint firstItem=\"aE6-mq-Y7V\" firstAttribute=\"leading\" secondItem=\"eRN-l2-fQC\" secondAttribute=\"leading\" id=\"EVQ-05-JBH\"/>\n                                            <constraint firstItem=\"aE6-mq-Y7V\" firstAttribute=\"top\" secondItem=\"eRN-l2-fQC\" secondAttribute=\"top\" id=\"NRB-Eu-AKZ\"/>\n                                        </constraints>\n                                        <connections>\n                                            <outlet property=\"numberLabel\" destination=\"aE6-mq-Y7V\" id=\"jJl-NE-6pn\"/>\n                                        </connections>\n                                    </collectionViewCell>\n                                </cells>\n                                <connections>\n                                    <outlet property=\"dataSource\" destination=\"BYZ-38-t0r\" id=\"KpJ-3q-uLB\"/>\n                                    <outlet property=\"delegate\" destination=\"BYZ-38-t0r\" id=\"N70-jo-rzu\"/>\n                                </connections>\n                            </collectionView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"aUi-mz-x7i\" secondAttribute=\"bottom\" id=\"ALa-nR-nll\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"aUi-mz-x7i\" secondAttribute=\"trailing\" id=\"Bkc-cu-Baf\"/>\n                            <constraint firstItem=\"aUi-mz-x7i\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leading\" id=\"H9L-aq-maz\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"aUi-mz-x7i\" secondAttribute=\"bottom\" id=\"OWb-va-vc8\"/>\n                            <constraint firstItem=\"aUi-mz-x7i\" firstAttribute=\"top\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"top\" id=\"d4S-bm-0lA\"/>\n                        </constraints>\n                        <variation key=\"default\">\n                            <mask key=\"constraints\">\n                                <exclude reference=\"ALa-nR-nll\"/>\n                            </mask>\n                        </variation>\n                    </view>\n                    <connections>\n                        <outlet property=\"collectionView\" destination=\"aUi-mz-x7i\" id=\"dcK-IC-4Zo\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.$(PRODUCT_NAME:rfc1034identifier)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/KYTilePhotoCell.h",
    "content": "//\n//  KYTilePhotoCell.h\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/6/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface KYTilePhotoCell : UICollectionViewCell\n@property (weak, nonatomic) IBOutlet UILabel *numberLabel;\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/KYTilePhotoCell.m",
    "content": "//\n//  KYTilePhotoCell.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/6/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import \"KYTilePhotoCell.h\"\n\n@implementation KYTilePhotoCell\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/UIColor+RandomFlatColors.h",
    "content": "//\n//  UIColor+RandomFlatColors.h\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/6/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \\\ngreen:((float)((rgbValue & 0xFF00) >> 8))/255.0 \\\nblue:((float)(rgbValue & 0xFF))/255.0 \\\nalpha:1.0]\n\n\n@interface UIColor (RandomFlatColors)\n\n+ (UIColor *)flatRedColor;\n+ (UIColor *)flatDarkRedColor;\n\n+ (UIColor *)flatGreenColor;\n+ (UIColor *)flatDarkGreenColor;\n\n+ (UIColor *)flatBlueColor;\n+ (UIColor *)flatDarkBlueColor;\n\n+ (UIColor *)flatTealColor;\n+ (UIColor *)flatDarkTealColor;\n\n+ (UIColor *)flatPurpleColor;\n+ (UIColor *)flatDarkPurpleColor;\n\n+ (UIColor *)flatBlackColor;\n+ (UIColor *)flatDarkBlackColor;\n\n+ (UIColor *)flatYellowColor;\n+ (UIColor *)flatDarkYellowColor;\n\n+ (UIColor *)flatOrangeColor;\n+ (UIColor *)flatDarkOrangeColor;\n\n+ (UIColor *)flatWhiteColor;\n+ (UIColor *)flatDarkWhiteColor;\n\n+ (UIColor *)flatGrayColor;\n+ (UIColor *)flatDarkGrayColor;\n\n+ (UIColor *)randomFlatColor;\n+ (UIColor *)randomFlatLightColor;\n+ (UIColor *)randomFlatDarkColor;\n\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/UIColor+RandomFlatColors.m",
    "content": "//\n//  UIColor+RandomFlatColors.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/6/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import \"UIColor+RandomFlatColors.h\"\n\n@implementation UIColor (RandomFlatColors)\n\n#pragma mark - Red\n+ (UIColor *)flatRedColor\n{\n    return UIColorFromRGB(0xE74C3C);\n}\n+ (UIColor *)flatDarkRedColor\n{\n    return UIColorFromRGB(0xC0392B);\n}\n\n#pragma mark - Green\n+ (UIColor *)flatGreenColor\n{\n    return UIColorFromRGB(0x2ECC71);\n}\n+ (UIColor *)flatDarkGreenColor\n{\n    return UIColorFromRGB(0x27AE60);\n}\n\n\n#pragma mark - Blue\n+ (UIColor *)flatBlueColor\n{\n    return UIColorFromRGB(0x3498DB);\n}\n+ (UIColor *)flatDarkBlueColor\n{\n    return UIColorFromRGB(0x2980B9);\n}\n\n\n#pragma mark - Teal\n+ (UIColor *)flatTealColor\n{\n    return UIColorFromRGB(0x1ABC9C);\n}\n+ (UIColor *)flatDarkTealColor\n{\n    return UIColorFromRGB(0x16A085);\n}\n\n#pragma mark - Purple\n+ (UIColor *)flatPurpleColor\n{\n    return UIColorFromRGB(0x9B59B6);\n}\n+ (UIColor *)flatDarkPurpleColor\n{\n    return UIColorFromRGB(0x8E44AD);\n}\n\n\n#pragma mark - Yellow\n+ (UIColor *)flatYellowColor\n{\n    return UIColorFromRGB(0xF1C40F);\n}\n+ (UIColor *)flatDarkYellowColor\n{\n    return UIColorFromRGB(0xF39C12);\n}\n\n\n#pragma mark - Orange\n+ (UIColor *)flatOrangeColor\n{\n    return UIColorFromRGB(0xE67E22);\n}\n+ (UIColor *)flatDarkOrangeColor\n{\n    return UIColorFromRGB(0xD35400);\n}\n\n\n\n#pragma mark - Gray\n+ (UIColor *)flatGrayColor\n{\n    return UIColorFromRGB(0x95A5A6);\n}\n\n+ (UIColor *)flatDarkGrayColor\n{\n    return UIColorFromRGB(0x7F8C8D);\n}\n\n\n\n#pragma mark - White\n+ (UIColor *)flatWhiteColor\n{\n    return UIColorFromRGB(0xECF0F1);\n}\n\n+ (UIColor *)flatDarkWhiteColor\n{\n    return UIColorFromRGB(0xBDC3C7);\n}\n\n\n\n#pragma mark - Black\n+ (UIColor *)flatBlackColor\n{\n    return UIColorFromRGB(0x34495E);\n}\n\n+ (UIColor *)flatDarkBlackColor\n{\n    return UIColorFromRGB(0x2C3E50);\n}\n\n\n\n#pragma mark - Random\n+ (UIColor *)randomFlatColor\n{\n    return [UIColor randomFlatColorIncludeLightShades:YES darkShades:YES];\n}\n\n+ (UIColor *)randomFlatLightColor\n{\n    return [UIColor randomFlatColorIncludeLightShades:YES darkShades:NO];\n}\n\n+ (UIColor *)randomFlatDarkColor\n{\n    return [UIColor randomFlatColorIncludeLightShades:NO darkShades:YES];\n}\n\n+ (UIColor *)randomFlatColorIncludeLightShades:(BOOL)useLightShades\n                                    darkShades:(BOOL)useDarkShades;\n{\n    const NSInteger numberOfLightColors = 10;\n    const NSInteger numberOfDarkColors = 10;\n    NSAssert(useLightShades || useDarkShades, @\"Must choose random color using at least light shades or dark shades.\");\n    \n    \n    u_int32_t numberOfColors = 0;\n    if(useLightShades){\n        numberOfColors += numberOfLightColors;\n    }\n    if(useDarkShades){\n        numberOfColors += numberOfDarkColors;\n    }\n    \n    u_int32_t chosenColor = arc4random_uniform(numberOfColors);\n    \n    if(!useLightShades){\n        chosenColor += numberOfLightColors;\n    }\n    \n    UIColor *color;\n    switch (chosenColor) {\n        case 0:\n            color = [UIColor flatRedColor];\n            break;\n        case 1:\n            color = [UIColor flatGreenColor];\n            break;\n        case 2:\n            color = [UIColor flatBlueColor];\n            break;\n        case 3:\n            color = [UIColor flatTealColor];\n            break;\n        case 4:\n            color = [UIColor flatPurpleColor];\n            break;\n        case 5:\n            color = [UIColor flatYellowColor];\n            break;\n        case 6:\n            color = [UIColor flatOrangeColor];\n            break;\n        case 7:\n            color = [UIColor flatGrayColor];\n            break;\n        case 8:\n            color = [UIColor flatWhiteColor];\n            break;\n        case 9:\n            color = [UIColor flatBlackColor];\n            break;\n        case 10:\n            color = [UIColor flatDarkRedColor];\n            break;\n        case 11:\n            color = [UIColor flatDarkGreenColor];\n            break;\n        case 12:\n            color = [UIColor flatDarkBlueColor];\n            break;\n        case 13:\n            color = [UIColor flatDarkTealColor];\n            break;\n        case 14:\n            color = [UIColor flatDarkPurpleColor];\n            break;\n        case 15:\n            color = [UIColor flatDarkYellowColor];\n            break;\n        case 16:\n            color = [UIColor flatDarkOrangeColor];\n            break;\n        case 17:\n            color = [UIColor flatDarkGrayColor];\n            break;\n        case 18:\n            color = [UIColor flatDarkWhiteColor];\n            break;\n        case 19:\n            color = [UIColor flatDarkBlackColor];\n            break;\n        case 20:\n        default:\n            NSAssert(0, @\"Unrecognized color selected as random color\");\n            break;\n    }\n    \n    return color;\n}\n\n\n@end\n\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/ViewController.h",
    "content": "//\n//  ViewController.h\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ViewController : UIViewController\n\n\n@end\n\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/ViewController.m",
    "content": "//\n//  ViewController.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import \"ViewController.h\"\n#import \"KYTilePhotoCell.h\"\n#import \"KYTilePhotoLayout.h\"\n#import \"UIColor+RandomFlatColors.h\"\n\nstatic NSString *ReuseIdentifier = @\"KYTilePhotoCell\";\n\n@interface ViewController ()<UICollectionViewDataSource,UICollectionViewDelegate>\n\n@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;\n\n@end\n\n@implementation ViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    // Do any additional setup after loading the view, typically from a nib.\n}\n\n- (void)didReceiveMemoryWarning {\n    [super didReceiveMemoryWarning];\n    // Dispose of any resources that can be recreated.\n}\n\n#pragma mark -- RotateToReLayout\n-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{\n    \n    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];\n    \n    KYTilePhotoLayout *layout = (KYTilePhotoLayout *)self.collectionView.collectionViewLayout;\n    [layout invalidateLayout];\n\n}\n\n\n#pragma mark -- UICollectionViewDataSource\n- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{\n    return 30;\n}\n\n\n- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{\n    \n    KYTilePhotoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ReuseIdentifier forIndexPath:indexPath];\n    cell.numberLabel.text = [NSString stringWithFormat:@\"%ld\",(long)indexPath.item];\n    cell.backgroundColor = [UIColor randomFlatColor];\n    \n    return cell;\n    \n}\n\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo/main.m",
    "content": "//\n//  main.m\n//  KYTilePhotoLayout-Demo\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"AppDelegate.h\"\n\nint main(int argc, char * argv[]) {\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n    }\n}\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t5FEFA7161B217C9400DC3DA0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA7151B217C9400DC3DA0 /* main.m */; };\n\t\t5FEFA7191B217C9400DC3DA0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA7181B217C9400DC3DA0 /* AppDelegate.m */; };\n\t\t5FEFA71C1B217C9400DC3DA0 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA71B1B217C9400DC3DA0 /* ViewController.m */; };\n\t\t5FEFA71F1B217C9400DC3DA0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FEFA71D1B217C9400DC3DA0 /* Main.storyboard */; };\n\t\t5FEFA7211B217C9400DC3DA0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FEFA7201B217C9400DC3DA0 /* Images.xcassets */; };\n\t\t5FEFA7241B217C9400DC3DA0 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5FEFA7221B217C9400DC3DA0 /* LaunchScreen.xib */; };\n\t\t5FEFA7301B217C9400DC3DA0 /* KYTilePhotoLayout_DemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA72F1B217C9400DC3DA0 /* KYTilePhotoLayout_DemoTests.m */; };\n\t\t5FEFA7471B21FB1100DC3DA0 /* KYTilePhotoLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA7461B21FB1100DC3DA0 /* KYTilePhotoLayout.m */; };\n\t\t5FEFA74B1B220E8400DC3DA0 /* KYTilePhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA74A1B220E8400DC3DA0 /* KYTilePhotoCell.m */; };\n\t\t5FEFA74E1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FEFA74D1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t5FEFA72A1B217C9400DC3DA0 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 5FEFA7081B217C9400DC3DA0 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 5FEFA70F1B217C9400DC3DA0;\n\t\t\tremoteInfo = \"KYTilePhotoLayout-Demo\";\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t5FEFA7101B217C9400DC3DA0 /* KYTilePhotoLayout-Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"KYTilePhotoLayout-Demo.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t5FEFA7141B217C9400DC3DA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t5FEFA7151B217C9400DC3DA0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t5FEFA7171B217C9400DC3DA0 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = \"<group>\"; };\n\t\t5FEFA7181B217C9400DC3DA0 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = \"<group>\"; };\n\t\t5FEFA71A1B217C9400DC3DA0 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = \"<group>\"; };\n\t\t5FEFA71B1B217C9400DC3DA0 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = \"<group>\"; };\n\t\t5FEFA71E1B217C9400DC3DA0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t5FEFA7201B217C9400DC3DA0 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = \"<group>\"; };\n\t\t5FEFA7231B217C9400DC3DA0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = \"<group>\"; };\n\t\t5FEFA7291B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = \"KYTilePhotoLayout-DemoTests.xctest\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t5FEFA72E1B217C9400DC3DA0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t5FEFA72F1B217C9400DC3DA0 /* KYTilePhotoLayout_DemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYTilePhotoLayout_DemoTests.m; sourceTree = \"<group>\"; };\n\t\t5FEFA7451B21FB1100DC3DA0 /* KYTilePhotoLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KYTilePhotoLayout.h; path = Classes/KYTilePhotoLayout.h; sourceTree = SOURCE_ROOT; };\n\t\t5FEFA7461B21FB1100DC3DA0 /* KYTilePhotoLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KYTilePhotoLayout.m; path = Classes/KYTilePhotoLayout.m; sourceTree = SOURCE_ROOT; };\n\t\t5FEFA7491B220E8400DC3DA0 /* KYTilePhotoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYTilePhotoCell.h; sourceTree = \"<group>\"; };\n\t\t5FEFA74A1B220E8400DC3DA0 /* KYTilePhotoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYTilePhotoCell.m; sourceTree = \"<group>\"; };\n\t\t5FEFA74C1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UIColor+RandomFlatColors.h\"; sourceTree = \"<group>\"; };\n\t\t5FEFA74D1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"UIColor+RandomFlatColors.m\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t5FEFA70D1B217C9400DC3DA0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t5FEFA7261B217C9400DC3DA0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t5FEFA7071B217C9400DC3DA0 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7121B217C9400DC3DA0 /* KYTilePhotoLayout-Demo */,\n\t\t\t\t5FEFA72C1B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests */,\n\t\t\t\t5FEFA7111B217C9400DC3DA0 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA7111B217C9400DC3DA0 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7101B217C9400DC3DA0 /* KYTilePhotoLayout-Demo.app */,\n\t\t\t\t5FEFA7291B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA7121B217C9400DC3DA0 /* KYTilePhotoLayout-Demo */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7171B217C9400DC3DA0 /* AppDelegate.h */,\n\t\t\t\t5FEFA7181B217C9400DC3DA0 /* AppDelegate.m */,\n\t\t\t\t5FEFA7481B21FB1D00DC3DA0 /* Classes */,\n\t\t\t\t5FEFA74F1B22280600DC3DA0 /* UIColor+RandomFlatColors */,\n\t\t\t\t5FEFA71A1B217C9400DC3DA0 /* ViewController.h */,\n\t\t\t\t5FEFA71B1B217C9400DC3DA0 /* ViewController.m */,\n\t\t\t\t5FEFA7491B220E8400DC3DA0 /* KYTilePhotoCell.h */,\n\t\t\t\t5FEFA74A1B220E8400DC3DA0 /* KYTilePhotoCell.m */,\n\t\t\t\t5FEFA71D1B217C9400DC3DA0 /* Main.storyboard */,\n\t\t\t\t5FEFA7201B217C9400DC3DA0 /* Images.xcassets */,\n\t\t\t\t5FEFA7221B217C9400DC3DA0 /* LaunchScreen.xib */,\n\t\t\t\t5FEFA7131B217C9400DC3DA0 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = \"KYTilePhotoLayout-Demo\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA7131B217C9400DC3DA0 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7141B217C9400DC3DA0 /* Info.plist */,\n\t\t\t\t5FEFA7151B217C9400DC3DA0 /* main.m */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA72C1B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA72F1B217C9400DC3DA0 /* KYTilePhotoLayout_DemoTests.m */,\n\t\t\t\t5FEFA72D1B217C9400DC3DA0 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = \"KYTilePhotoLayout-DemoTests\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA72D1B217C9400DC3DA0 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA72E1B217C9400DC3DA0 /* Info.plist */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA7481B21FB1D00DC3DA0 /* Classes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7451B21FB1100DC3DA0 /* KYTilePhotoLayout.h */,\n\t\t\t\t5FEFA7461B21FB1100DC3DA0 /* KYTilePhotoLayout.m */,\n\t\t\t);\n\t\t\tname = Classes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA74F1B22280600DC3DA0 /* UIColor+RandomFlatColors */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA74C1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.h */,\n\t\t\t\t5FEFA74D1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.m */,\n\t\t\t);\n\t\t\tname = \"UIColor+RandomFlatColors\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t5FEFA70F1B217C9400DC3DA0 /* KYTilePhotoLayout-Demo */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 5FEFA7331B217C9400DC3DA0 /* Build configuration list for PBXNativeTarget \"KYTilePhotoLayout-Demo\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t5FEFA70C1B217C9400DC3DA0 /* Sources */,\n\t\t\t\t5FEFA70D1B217C9400DC3DA0 /* Frameworks */,\n\t\t\t\t5FEFA70E1B217C9400DC3DA0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = \"KYTilePhotoLayout-Demo\";\n\t\t\tproductName = \"KYTilePhotoLayout-Demo\";\n\t\t\tproductReference = 5FEFA7101B217C9400DC3DA0 /* KYTilePhotoLayout-Demo.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t5FEFA7281B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 5FEFA7361B217C9400DC3DA0 /* Build configuration list for PBXNativeTarget \"KYTilePhotoLayout-DemoTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t5FEFA7251B217C9400DC3DA0 /* Sources */,\n\t\t\t\t5FEFA7261B217C9400DC3DA0 /* Frameworks */,\n\t\t\t\t5FEFA7271B217C9400DC3DA0 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t5FEFA72B1B217C9400DC3DA0 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = \"KYTilePhotoLayout-DemoTests\";\n\t\t\tproductName = \"KYTilePhotoLayout-DemoTests\";\n\t\t\tproductReference = 5FEFA7291B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t5FEFA7081B217C9400DC3DA0 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0630;\n\t\t\t\tORGANIZATIONNAME = \"Kitten Yang\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t5FEFA70F1B217C9400DC3DA0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.3;\n\t\t\t\t\t};\n\t\t\t\t\t5FEFA7281B217C9400DC3DA0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.3;\n\t\t\t\t\t\tTestTargetID = 5FEFA70F1B217C9400DC3DA0;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 5FEFA70B1B217C9400DC3DA0 /* Build configuration list for PBXProject \"KYTilePhotoLayout-Demo\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 5FEFA7071B217C9400DC3DA0;\n\t\t\tproductRefGroup = 5FEFA7111B217C9400DC3DA0 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t5FEFA70F1B217C9400DC3DA0 /* KYTilePhotoLayout-Demo */,\n\t\t\t\t5FEFA7281B217C9400DC3DA0 /* KYTilePhotoLayout-DemoTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t5FEFA70E1B217C9400DC3DA0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t5FEFA71F1B217C9400DC3DA0 /* Main.storyboard in Resources */,\n\t\t\t\t5FEFA7241B217C9400DC3DA0 /* LaunchScreen.xib in Resources */,\n\t\t\t\t5FEFA7211B217C9400DC3DA0 /* Images.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t5FEFA7271B217C9400DC3DA0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t5FEFA70C1B217C9400DC3DA0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t5FEFA7471B21FB1100DC3DA0 /* KYTilePhotoLayout.m in Sources */,\n\t\t\t\t5FEFA71C1B217C9400DC3DA0 /* ViewController.m in Sources */,\n\t\t\t\t5FEFA7191B217C9400DC3DA0 /* AppDelegate.m in Sources */,\n\t\t\t\t5FEFA74E1B2227AD00DC3DA0 /* UIColor+RandomFlatColors.m in Sources */,\n\t\t\t\t5FEFA7161B217C9400DC3DA0 /* main.m in Sources */,\n\t\t\t\t5FEFA74B1B220E8400DC3DA0 /* KYTilePhotoCell.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t5FEFA7251B217C9400DC3DA0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t5FEFA7301B217C9400DC3DA0 /* KYTilePhotoLayout_DemoTests.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t5FEFA72B1B217C9400DC3DA0 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 5FEFA70F1B217C9400DC3DA0 /* KYTilePhotoLayout-Demo */;\n\t\t\ttargetProxy = 5FEFA72A1B217C9400DC3DA0 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t5FEFA71D1B217C9400DC3DA0 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA71E1B217C9400DC3DA0 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5FEFA7221B217C9400DC3DA0 /* LaunchScreen.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t5FEFA7231B217C9400DC3DA0 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.xib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t5FEFA7311B217C9400DC3DA0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t5FEFA7321B217C9400DC3DA0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t5FEFA7341B217C9400DC3DA0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tINFOPLIST_FILE = \"KYTilePhotoLayout-Demo/Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t5FEFA7351B217C9400DC3DA0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tINFOPLIST_FILE = \"KYTilePhotoLayout-Demo/Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t5FEFA7371B217C9400DC3DA0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"KYTilePhotoLayout-DemoTests/Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/KYTilePhotoLayout-Demo.app/KYTilePhotoLayout-Demo\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t5FEFA7381B217C9400DC3DA0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"KYTilePhotoLayout-DemoTests/Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/KYTilePhotoLayout-Demo.app/KYTilePhotoLayout-Demo\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t5FEFA70B1B217C9400DC3DA0 /* Build configuration list for PBXProject \"KYTilePhotoLayout-Demo\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t5FEFA7311B217C9400DC3DA0 /* Debug */,\n\t\t\t\t5FEFA7321B217C9400DC3DA0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t5FEFA7331B217C9400DC3DA0 /* Build configuration list for PBXNativeTarget \"KYTilePhotoLayout-Demo\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t5FEFA7341B217C9400DC3DA0 /* Debug */,\n\t\t\t\t5FEFA7351B217C9400DC3DA0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t5FEFA7361B217C9400DC3DA0 /* Build configuration list for PBXNativeTarget \"KYTilePhotoLayout-DemoTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t5FEFA7371B217C9400DC3DA0 /* Debug */,\n\t\t\t\t5FEFA7381B217C9400DC3DA0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 5FEFA7081B217C9400DC3DA0 /* Project object */;\n}\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:KYTilePhotoLayout-Demo.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-DemoTests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.$(PRODUCT_NAME:rfc1034identifier)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "KYTilePhotoLayout-Demo/KYTilePhotoLayout-DemoTests/KYTilePhotoLayout_DemoTests.m",
    "content": "//\n//  KYTilePhotoLayout_DemoTests.m\n//  KYTilePhotoLayout-DemoTests\n//\n//  Created by Kitten Yang on 6/5/15.\n//  Copyright (c) 2015 Kitten Yang. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import <XCTest/XCTest.h>\n\n@interface KYTilePhotoLayout_DemoTests : XCTestCase\n\n@end\n\n@implementation KYTilePhotoLayout_DemoTests\n\n- (void)setUp {\n    [super setUp];\n    // Put setup code here. This method is called before the invocation of each test method in the class.\n}\n\n- (void)tearDown {\n    // Put teardown code here. This method is called after the invocation of each test method in the class.\n    [super tearDown];\n}\n\n- (void)testExample {\n    // This is an example of a functional test case.\n    XCTAssert(YES, @\"Pass\");\n}\n\n- (void)testPerformanceExample {\n    // This is an example of a performance test case.\n    [self measureBlock:^{\n        // Put the code you want to measure the time of here.\n    }];\n}\n\n@end\n"
  },
  {
    "path": "KYTilePhotoLayout.podspec",
    "content": "#\n#  Be sure to run `pod spec lint KYCuteView.podspec' to ensure this is a\n#  valid spec and to remove all comments including this before submitting the spec.\n#\n#  To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html\n#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/\n#\n\nPod::Spec.new do |s|\n\n  # ―――  Spec Metadata  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  These will help people to find your library, and whilst it\n  #  can feel like a chore to fill in it's definitely to your advantage. The\n  #  summary should be tweet-length, and the description more in depth.\n  #\n\n  s.name         = \"KYTilePhotoLayout\"\n  s.version      = \"1.0.0\"\n  s.summary      = \"A UICollectionViewLayout with a really interesting image layout algorithm.\"\n\n  s.description  = <<-DESC\n\n                   一个图片布局算法，实现图片的不规则紧凑排列，\bA UICollectionViewLayout with a really interesting image layout algorithm.\n                   \n                   DESC\n\n  s.homepage     = \"https://github.com/KittenYang/KYTilePhotoLayout\"\n  # s.screenshots  = \"www.example.com/screenshots_1.gif\", \"www.example.com/screenshots_2.gif\"\n\n\n  # ―――  Spec License  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  Licensing your code is important. See http://choosealicense.com for more info.\n  #  CocoaPods will detect a license file if there is a named LICENSE*\n  #  Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.\n  #\n\n  s.license      = \"MIT\"\n  # s.license      = { :type => \"MIT\", :file => \"FILE_LICENSE\" }\n\n\n  # ――― Author Metadata  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  Specify the authors of the library, with email addresses. Email addresses\n  #  of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also\n  #  accepts just a name if you'd rather not provide an email address.\n  #\n  #  Specify a social_media_url where others can refer to, for example a twitter\n  #  profile URL.\n  #\n\n  s.author             = { \"KittenYang\" => \"kittenyang@icloud.com\" }\n  # Or just: s.author    = \"KittenYang\"\n  # s.authors            = { \"KittenYang\" => \"kittenyang@icloud.com\" }\n  # s.social_media_url   = \"http://twitter.com/KittenYang\"\n\n  # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  If this Pod runs only on iOS or OS X, then specify the platform and\n  #  the deployment target. You can optionally include the target after the platform.\n  #\n\n  s.platform     = :ios\n  s.platform     = :ios, \"6.0\"\n\n  #  When using multiple platforms\n  # s.ios.deployment_target = \"5.0\"\n  # s.osx.deployment_target = \"10.7\"\n\n\n  # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  Specify the location from where the source should be retrieved.\n  #  Supports git, hg, bzr, svn and HTTP.\n  #\n\n  s.source       = { :git => \"https://github.com/KittenYang/KYTilePhotoLayout.git\", :tag => s.version.to_s }\n\n\n  # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  CocoaPods is smart about how it includes source code. For source files\n  #  giving a folder will include any swift, h, m, mm, c & cpp files.\n  #  For header files it will include any header in the folder.\n  #  Not including the public_header_files will make all headers public.\n  #\n\n  s.source_files  = \"KYTilePhotoLayout-Demo/Classes/**/*.{h,m}\"\n  #s.exclude_files = \"Classes/Exclude\"\n\n  # s.public_header_files = \"Classes/**/*.h\"\n\n\n  # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  A list of resources included with the Pod. These are copied into the\n  #  target bundle with a build phase script. Anything else will be cleaned.\n  #  You can preserve files from being cleaned, please don't preserve\n  #  non-essential files like tests, examples and documentation.\n  #\n\n  # s.resource  = \"icon.png\"\n  # s.resources = \"Resources/*.png\"\n\n  # s.preserve_paths = \"FilesToSave\", \"MoreFilesToSave\"\n\n\n  # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  Link your library with frameworks, or libraries. Libraries do not include\n  #  the lib prefix of their name.\n  #\n\n  s.framework  = \"Foundation\",\"UIKit\"\n  # s.frameworks = \"SomeFramework\", \"AnotherFramework\"\n\n  # s.library   = \"iconv\"\n  # s.libraries = \"iconv\", \"xml2\"\n\n\n  # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #\n  #\n  #  If your library depends on compiler flags you can set them in the xcconfig hash\n  #  where they will only apply to your library. If you depend on other Podspecs\n  #  you can include multiple dependencies to ensure it works.\n\n  # s.requires_arc = true\n\n  # s.xcconfig = { \"HEADER_SEARCH_PATHS\" => \"$(SDKROOT)/usr/include/libxml2\" }\n  \nend\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Qitao Yang\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"left\" >\n  <img src=\"logo.png\" alt=\"KYTilePhotoLayout\" title=\"KYTilePhotoLayout\">\n</p>\n\n\n![CocoaPods Version](https://img.shields.io/badge/pod-v1.0.0-brightgreen.svg)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Platform](https://img.shields.io/badge/platform-iOS-red.svg)\n\n\nA UICollectionViewLayout with a really interesting image layout algorithm.\n\n一个图片布局算法，实现图片的不规则排列，并且大小不一。具体效果如图:\n\nAlgorithm introduce article:\n\n算法介绍文章：\n\n[Blog](http://kittenyang.com/layout-algorithm/)\n\n##垂直滚动：Vertical Scroll\n\n<img src=\"layout_l_v.gif\" width = \"500\">\n\n<img src=\"layout_p_v.gif\" width = \"300\">\n\n##水平滚动：Horizontal Scroll\n\n<img src=\"layout_l_h.gif\" width = \"500\">\n\n<img src=\"layout_p_h.gif\" width = \"300\">\n\n\n##Installation\n\n`pod 'KYTilePhotoLayout', '~> 1.0.0'`\n\n\n##How to use\n\nIt's just two files: `KYTilePhotoLayout.h` && `KYTilePhotoLayout.m`. And it's the subclass of `UICollectionViewLayout`.So you can easily use like a normal `UICollectionViewLayout`. eg:\n\n###＊Use code:\n\n```objc\n\n    KYTilePhotoLayout *tileLayout = [[KYTilePhotoLayout alloc]init];\n    tileLayout.ColOfPortrait  = 2;\n    tileLayout.ColOfLandscape = 3;\n    tileLayout.LayoutDirection =  Vertical;\n    self.collectionView.collectionViewLayout = tileLayout;\n\n```\n\n###＊Use Interface Builder:\n\nSet the layout's class to **KYTilePhotoLayout** .Then you can set the value visibly:\n\n<img src=\"ScreenShot_1.png\" width = \"500\">\n\n<img src=\"ScreenShot_2.png\" width = \"500\">\n\n\n##How to invoke transition between Portrait and Landscape:\n\n```objc\nIn you ViewController:\n\n#pragma mark -- RotateToReLayout\n-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{\n    \n    [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];\n    \n    KYTilePhotoLayout *layout = (KYTilePhotoLayout *)self.collectionView.collectionViewLayout;\n    [layout invalidateLayout];\n}\n\n```\n\n##License\nThis project is under MIT License. See LICENSE file for more information.\n"
  }
]