[
  {
    "path": ".gitignore",
    "content": "# Add any directories, files, or patterns you don't want to be tracked by version control\n# Created by http://www.gitignore.io\n\n### OSX ###\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n\n# Thumbnails\n._*\n\n# Files that might appear on external disk\n.Spotlight-V100\n.Trashes\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n\n### Swift ###\n# 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\n\n### Xcode ###\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*.xcuserstate\n\n\n\n\n\n# Created by https://www.gitignore.io/api/macos\n\n### macOS ###\n*.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n\n# Thumbnails\n._*\n\n# Files that might appear in the root of a volume\n.DocumentRevisions-V100\n.fseventsd\n.Spotlight-V100\n.TemporaryItems\n.Trashes\n.VolumeIcon.icns\n.com.apple.timemachine.donotpresent\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n# End of https://www.gitignore.io/api/macos\n"
  },
  {
    "path": ".swift-version",
    "content": "4.0\n"
  },
  {
    "path": "AZSafariCollectionViewLayout.podspec",
    "content": "\nPod::Spec.new do |s|\n\n\n  s.name         = \"AZSafariCollectionViewLayout\"\n  s.version      = \"0.1.0\"\n  s.summary      = \"AZSafariCollectionViewLayout is replica of safari browser history page layout\"\n\n  s.description  = <<-DESC\n\tAZSafariCollectionViewLayout is replica of safari browser history page layout. very easy to use, IBInspectable are given for easy integration.\n    DESC\n\n  s.homepage     = \"https://github.com/AfrozZaheer/AZSafariCollectionViewLayout\"\n\n  s.platform         = :ios, \"9.3\"\n  s.license      = { :type => 'MIT', :file => 'LICENSE' }\n\n\n  s.author       = { \"AfrozZaheer\" => \"afrozezaheer@gmail.com\" }\n\n  s.source       = { :git => \"https://github.com/AfrozZaheer/AZSafariCollectionViewLayout.git\" }\n\n  s.source_files = 'Source/**/*.{swift}'\n\nend\n"
  },
  {
    "path": "Example/AZTestLayout/AZExploreLayout.swift",
    "content": "//\n//  AZExploreLayout.swift\n//  AZTestLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport Foundation\n\nimport UIKit\n\nclass AZExploreCollectionViewLayout: UICollectionViewLayout {\n    \n    var attributes  = Array<UICollectionViewLayoutAttributes>()\n    var contentSize: CGSize = CGSize(width: 0, height: 0)\n    var itemGap: CGFloat?\n    \n    override func prepare() {\n        super.prepare()\n        \n        if collectionView?.numberOfSections != 1 {\n            return\n        }\n        itemGap = CGFloat(roundf(Float(self.collectionView!.frame.size.height*0.2)))\n        \n        var top = CGFloat(0.0)\n        let left = CGFloat(0.0)\n        let width = collectionView?.frame.size.width\n        let height = (collectionView?.frame.size.height)!\n        self.contentSize = CGSize(width: width!, height: height)\n        guard let limit = collectionView?.numberOfItems(inSection: 0) else {\n            return\n        }\n        \n        for item in 0..<limit {\n            let indexPath = IndexPath(item: item, section: 0)\n            let attribute = UICollectionViewLayoutAttributes(forCellWith: indexPath)\n            let frame = CGRect(x: left, y: top, width: width!, height: height)\n            \n            attribute.frame = frame\n            attribute.zIndex = item\n            \n            let angleOfRotation = CGFloat(-00.0)\n            \n            let rotation = CATransform3DMakeRotation((CGFloat.pi*angleOfRotation/180.0), 1.0, 0.0, 0.0)\n            \n            let depth = CGFloat(30.0)\n            let translateDown = CATransform3DMakeTranslation(0.0, 0.0, -depth)\n            let translateUp = CATransform3DMakeTranslation(0.0, 0.0, depth)\n            var scale = CATransform3DIdentity\n            scale.m34 = -1.0/1500.0\n            let perspective =  CATransform3DConcat(CATransform3DConcat(translateDown, scale), translateUp)\n            \n            let  transform = CATransform3DConcat(rotation, perspective)\n            attribute.transform3D = transform\n            self.attributes.append(attribute)\n            \n            top += height\n            \n        }\n        if self.attributes.count > 0 {\n            let lastItemAttributes = self.attributes.last\n            let newHeight = (lastItemAttributes?.frame.origin.y)! + (lastItemAttributes?.frame.size.height)!\n            let newWidth = width!\n            \n            self.contentSize = CGSize(width: newWidth, height: newHeight)\n        }\n    }\n    \n    override var collectionViewContentSize: CGSize {\n        return self.contentSize\n    }\n    \n    override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {\n        \n        var visibleLayoutAttributes = [UICollectionViewLayoutAttributes]()\n        \n        for attributes in self.attributes {\n            if attributes.frame.intersects(rect) {\n                visibleLayoutAttributes.append(attributes)\n            }\n        }\n        return visibleLayoutAttributes\n    }\n    \n    override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        \n        return self.attributes[indexPath.item]\n    }\n    \n    override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {\n        return true\n    }\n    \n    override func initialLayoutAttributesForAppearingItem(at itemIndexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        return self.attributes[itemIndexPath.item]\n    }\n    \n}\n"
  },
  {
    "path": "Example/AZTestLayout/AZSafariLayout.swift",
    "content": "//\n//  AZSafariLayout.swift\n//  AZSafariLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport UIKit\n\nclass AZSafariCollectionViewLayout: UICollectionViewLayout {\n    \n    var attributes  = Array<UICollectionViewLayoutAttributes>()\n    var contentSize: CGSize = CGSize(width: 0, height: 0)\n    @IBInspectable var itemGap: CGFloat = 50\n    @IBInspectable var height : CGFloat = 0\n    @IBInspectable var angleOfRotation : CGFloat = -30\n    \n    \n    override func prepare() {\n        super.prepare()\n\n        if collectionView?.numberOfSections != 1 {\n            return\n        }\n        //itemGap = CGFloat(roundf(Float(self.collectionView!.frame.size.height*0.1)))\n        \n        var top = CGFloat(0.0)\n        let left = CGFloat(0.0)\n        let width = collectionView?.frame.size.width\n        self.contentSize = CGSize(width: width!, height: height)\n        guard let limit = collectionView?.numberOfItems(inSection: 0) else {\n            return\n        }\n        \n        for item in 0..<limit {\n            let indexPath = IndexPath(item: item, section: 0)\n            let attribute = UICollectionViewLayoutAttributes(forCellWith: indexPath)\n            let frame = CGRect(x: left, y: top, width: width!, height: height)\n            \n            attribute.frame = frame\n            attribute.zIndex = item\n            \n            angleOfRotation = CGFloat(-30.0)\n            \n            var frameOffset = Float((self.collectionView?.contentOffset.y)! - frame.origin.y) - floorf(Float(self.collectionView!.frame.size.height/10.0))\n            \n            if frameOffset > 0 {\n                frameOffset = frameOffset/5.0\n                frameOffset = min(frameOffset, 30.0)\n                angleOfRotation += CGFloat(frameOffset)\n            }\n            \n            let rotation = CATransform3DMakeRotation((CGFloat.pi*angleOfRotation/180.0), 1.0, 0.0, 0.0)\n            \n            let depth = CGFloat(250.0)\n            let translateDown = CATransform3DMakeTranslation(0.0, 0.0, -depth)\n            let translateUp = CATransform3DMakeTranslation(0.0, 0.0, depth)\n            var scale = CATransform3DIdentity\n            scale.m34 = -1.0/1500.0\n            let perspective =  CATransform3DConcat(CATransform3DConcat(translateDown, scale), translateUp)\n            let  transform = CATransform3DConcat(rotation, perspective)\n            \n            \n            let gap = self.itemGap\n            attribute.transform3D = transform\n            self.attributes.append(attribute)\n            \n            top += gap\n            \n        }\n        if self.attributes.count > 0 {\n            let lastItemAttributes = self.attributes.last\n            let newHeight = (lastItemAttributes?.frame.origin.y)! + (lastItemAttributes?.frame.size.height)! + 20\n            let newWidth = (self.collectionView?.frame.size.width)!\n            \n            self.contentSize = CGSize(width: newWidth, height: newHeight)\n        }\n    }\n    \n    override var collectionViewContentSize: CGSize {\n        return self.contentSize\n    }\n\n    override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {\n        \n        var visibleLayoutAttributes = [UICollectionViewLayoutAttributes]()\n        \n        for attributes in self.attributes {\n            if attributes.frame.intersects(rect) {\n                visibleLayoutAttributes.append(attributes)\n            }\n        }\n        return visibleLayoutAttributes\n    }\n    \n    override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n       \n        return self.attributes[indexPath.item]\n    }\n    \n    override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {\n        return true\n    }\n    \n    override func initialLayoutAttributesForAppearingItem(at itemIndexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        return self.attributes[itemIndexPath.item]\n    }\n    \n}\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "Example/AZTestLayout/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  AZTestLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport UIKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        return true\n    }\n\n    func applicationWillResignActive(_ application: UIApplication) {\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 invalidate graphics rendering callbacks. Games should use this method to pause the game.\n    }\n\n    func applicationDidEnterBackground(_ application: UIApplication) {\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    func applicationWillEnterForeground(_ application: UIApplication) {\n        // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.\n    }\n\n    func applicationDidBecomeActive(_ application: UIApplication) {\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    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n    }\n\n\n}\n"
  },
  {
    "path": "Example/AZTestLayout/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\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\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\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      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "Example/AZTestLayout/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13122.16\" systemVersion=\"17A277\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13104.12\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "Example/AZTestLayout/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" customModule=\"AZTestLayout\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" dataMode=\"prototypes\" prefetchingEnabled=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YER-8k-FBe\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                                <color key=\"backgroundColor\" white=\"0.33333333333333331\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                <collectionViewFlowLayout key=\"collectionViewLayout\" minimumLineSpacing=\"10\" minimumInteritemSpacing=\"10\" id=\"MDM-L8-nWR\">\n                                    <size key=\"itemSize\" width=\"50\" height=\"50\"/>\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                                </collectionViewFlowLayout>\n                                <cells/>\n                                <connections>\n                                    <outlet property=\"dataSource\" destination=\"BYZ-38-t0r\" id=\"h90-tj-Pcv\"/>\n                                    <outlet property=\"delegate\" destination=\"BYZ-38-t0r\" id=\"xMG-P9-TG5\"/>\n                                </connections>\n                            </collectionView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"YER-8k-FBe\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"GHN-kc-hPe\"/>\n                            <constraint firstItem=\"YER-8k-FBe\" firstAttribute=\"top\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"top\" id=\"JMZ-IV-CQ2\"/>\n                            <constraint firstItem=\"6Tk-OE-BBY\" firstAttribute=\"trailing\" secondItem=\"YER-8k-FBe\" secondAttribute=\"trailing\" id=\"ZbL-nr-jAe\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"YER-8k-FBe\" secondAttribute=\"bottom\" id=\"tgR-GQ-tBY\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"collectionView\" destination=\"YER-8k-FBe\" id=\"5k6-Mg-SKH\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "Example/AZTestLayout/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>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>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": "Example/AZTestLayout/TabCollectionViewCell.swift",
    "content": "//\n//  TabCollectionViewCell.swift\n//  AZTestLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport UIKit\nimport WebKit\n\nclass TabCollectionViewCell: UICollectionViewCell {\n\n    @IBOutlet weak var webView: UIWebView!\n    @IBOutlet weak var bgView: UIView!\n    override func awakeFromNib() {\n        super.awakeFromNib()\n        // Initialization code\n    }\n\n}\n"
  },
  {
    "path": "Example/AZTestLayout/TabCollectionViewCell.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"TabCollectionViewCell\" id=\"gTV-IL-0wX\" customClass=\"TabCollectionViewCell\" customModule=\"AZTestLayout\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"372\" height=\"360\"/>\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=\"372\" height=\"360\"/>\n                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                <subviews>\n                    <view clipsSubviews=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SsC-2H-ahl\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"372\" height=\"360\"/>\n                        <subviews>\n                            <webView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"4ib-Kp-C9i\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"372\" height=\"360\"/>\n                                <color key=\"backgroundColor\" red=\"0.36078431370000003\" green=\"0.38823529410000002\" blue=\"0.4039215686\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </webView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"0.33333333333333331\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"4ib-Kp-C9i\" secondAttribute=\"trailing\" id=\"97V-Lb-pAe\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"4ib-Kp-C9i\" secondAttribute=\"bottom\" id=\"LS2-MY-xqi\"/>\n                            <constraint firstItem=\"4ib-Kp-C9i\" firstAttribute=\"top\" secondItem=\"SsC-2H-ahl\" secondAttribute=\"top\" id=\"ZrR-uc-0hd\"/>\n                            <constraint firstItem=\"4ib-Kp-C9i\" firstAttribute=\"leading\" secondItem=\"SsC-2H-ahl\" secondAttribute=\"leading\" id=\"dK4-sy-kPC\"/>\n                        </constraints>\n                    </view>\n                </subviews>\n            </view>\n            <constraints>\n                <constraint firstAttribute=\"trailing\" secondItem=\"SsC-2H-ahl\" secondAttribute=\"trailing\" id=\"6TT-jm-QEO\"/>\n                <constraint firstItem=\"SsC-2H-ahl\" firstAttribute=\"top\" secondItem=\"gTV-IL-0wX\" secondAttribute=\"top\" id=\"8GF-UM-NqO\"/>\n                <constraint firstItem=\"SsC-2H-ahl\" firstAttribute=\"leading\" secondItem=\"gTV-IL-0wX\" secondAttribute=\"leading\" id=\"gIb-Bx-7QM\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"SsC-2H-ahl\" secondAttribute=\"bottom\" id=\"kqW-Yg-cbi\"/>\n            </constraints>\n            <viewLayoutGuide key=\"safeArea\" id=\"ZTg-uK-7eu\"/>\n            <size key=\"customSize\" width=\"372\" height=\"360\"/>\n            <connections>\n                <outlet property=\"bgView\" destination=\"SsC-2H-ahl\" id=\"Cli-CW-RbF\"/>\n                <outlet property=\"webView\" destination=\"4ib-Kp-C9i\" id=\"kqU-Oz-ksf\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"-6\" y=\"17\"/>\n        </collectionViewCell>\n    </objects>\n</document>\n"
  },
  {
    "path": "Example/AZTestLayout/ViewController.swift",
    "content": "//\n//  ViewController.swift\n//  AZTestLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport UIKit\nimport WebKit\n\nclass ViewController: UIViewController {\n\n    @IBOutlet weak var collectionView: UICollectionView!\n    \n    let exploreLayout = AZExploreCollectionViewLayout()\n    let browsingLayout = AZSafariCollectionViewLayout()\n    let sitesData = [\"https://www.google.com\",\"https://www.apple.com\",\"https://www.yahoo.com\",\"https://www.bing.com\",\"https://www.msn.com\",\"https://www.cocoacontrols.com\",\"https://www.github.com/AfrozZaheer\",\"https://www.google.com\" ]\n    var isSelected = false\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        collectionView.register(UINib(nibName: \"TabCollectionViewCell\", bundle: nil), forCellWithReuseIdentifier: \"TabCollectionViewCell\")\n        collectionView.setCollectionViewLayout(browsingLayout, animated: true)\n        browsingLayout.height = (collectionView?.frame.size.height)!\n        browsingLayout.itemGap = 150\n        \n    }\n\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n       // collectionView.scrollToItem(at: IndexPath(item: sitesData.count - 1, section: 0), at: .bottom, animated: true)\n    }\n    \n    \n}\n\nextension ViewController: UICollectionViewDelegate, UICollectionViewDataSource {\n    \n    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {\n        return sitesData.count\n    }\n    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {\n        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: \"TabCollectionViewCell\", for: indexPath) as! TabCollectionViewCell\n\n        DispatchQueue.once(token: \"\\(indexPath.item)\") {\n            DispatchQueue.main.async {\n                let site = self.sitesData[indexPath.item]\n                let request = URLRequest(url: URL(string: site)!)\n                cell.webView.loadRequest(request)\n            }\n        }\n        \n        cell.bgView.layer.shadowColor = UIColor.black.cgColor\n        \n        cell.bgView.layer.shadowOffset = CGSize(width: 0.0, height: -20.0)\n      \n        cell.bgView.layer.shadowOpacity = 0.6\n        cell.bgView.layer.shadowRadius = 20.0\n        cell.bgView.layer.shadowPath = UIBezierPath(rect: cell.contentView.bounds).cgPath\n        //cell.bgView.layer.shouldRasterize = true\n        cell.bgView.layer.cornerRadius = 15\n        \n        return cell\n    }\n    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {\n        DispatchQueue.main.async {\n            if self.isSelected == false {\n                collectionView.setCollectionViewLayout(self.exploreLayout, animated: true)\n                self.isSelected = true\n            }\n            else {\n                collectionView.setCollectionViewLayout(self.browsingLayout, animated: true)\n                self.isSelected = false\n            }\n        }\n    }\n}\n\n\npublic extension DispatchQueue {\n    \n    private static var _onceTracker = [String]()\n    \n    /**\n     Executes a block of code, associated with a unique token, only once.  The code is thread safe and will\n     only execute the code once even in the presence of multithreaded calls.\n     \n     - parameter token: A unique reverse DNS style name such as com.vectorform.<name> or a GUID\n     - parameter block: Block to execute once\n     */\n    public class func once(token: String, block:()->Void) {\n        objc_sync_enter(self); defer { objc_sync_exit(self) }\n        \n        if _onceTracker.contains(token) {\n            return\n        }\n        \n        _onceTracker.append(token)\n        block()\n    }\n}\n\n"
  },
  {
    "path": "Example/AZTestLayout.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\tB8545A9A2046B92D004F04B7 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = B8545A992046B92D004F04B7 /* README.md */; };\n\t\tB8764899203E9BBD00B1FA40 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8764898203E9BBD00B1FA40 /* AppDelegate.swift */; };\n\t\tB876489B203E9BBD00B1FA40 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B876489A203E9BBD00B1FA40 /* ViewController.swift */; };\n\t\tB876489E203E9BBD00B1FA40 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B876489C203E9BBD00B1FA40 /* Main.storyboard */; };\n\t\tB87648A0203E9BBD00B1FA40 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B876489F203E9BBD00B1FA40 /* Assets.xcassets */; };\n\t\tB87648A3203E9BBD00B1FA40 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B87648A1203E9BBD00B1FA40 /* LaunchScreen.storyboard */; };\n\t\tB87648AB203E9BE900B1FA40 /* AZSafariLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = B87648AA203E9BE900B1FA40 /* AZSafariLayout.swift */; };\n\t\tB87648AE203EA27100B1FA40 /* TabCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B87648AC203EA27100B1FA40 /* TabCollectionViewCell.swift */; };\n\t\tB87648AF203EA27100B1FA40 /* TabCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B87648AD203EA27100B1FA40 /* TabCollectionViewCell.xib */; };\n\t\tB895EBE920401D4600625F57 /* AZExploreLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = B895EBE820401D4600625F57 /* AZExploreLayout.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\tB8545A992046B92D004F04B7 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../README.md; sourceTree = \"<group>\"; };\n\t\tB8764895203E9BBD00B1FA40 /* AZTestLayout.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AZTestLayout.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tB8764898203E9BBD00B1FA40 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\tB876489A203E9BBD00B1FA40 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = \"<group>\"; };\n\t\tB876489D203E9BBD00B1FA40 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\tB876489F203E9BBD00B1FA40 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\tB87648A2203E9BBD00B1FA40 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\tB87648A4203E9BBD00B1FA40 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tB87648AA203E9BE900B1FA40 /* AZSafariLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AZSafariLayout.swift; sourceTree = \"<group>\"; };\n\t\tB87648AC203EA27100B1FA40 /* TabCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabCollectionViewCell.swift; sourceTree = \"<group>\"; };\n\t\tB87648AD203EA27100B1FA40 /* TabCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TabCollectionViewCell.xib; sourceTree = \"<group>\"; };\n\t\tB895EBE820401D4600625F57 /* AZExploreLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AZExploreLayout.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tB8764892203E9BBD00B1FA40 /* 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\tB876488C203E9BBD00B1FA40 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tB8764897203E9BBD00B1FA40 /* AZTestLayout */,\n\t\t\t\tB8764896203E9BBD00B1FA40 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB8764896203E9BBD00B1FA40 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tB8764895203E9BBD00B1FA40 /* AZTestLayout.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB8764897203E9BBD00B1FA40 /* AZTestLayout */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tB8545A992046B92D004F04B7 /* README.md */,\n\t\t\t\tB8764898203E9BBD00B1FA40 /* AppDelegate.swift */,\n\t\t\t\tB876489A203E9BBD00B1FA40 /* ViewController.swift */,\n\t\t\t\tB876489C203E9BBD00B1FA40 /* Main.storyboard */,\n\t\t\t\tB876489F203E9BBD00B1FA40 /* Assets.xcassets */,\n\t\t\t\tB87648A1203E9BBD00B1FA40 /* LaunchScreen.storyboard */,\n\t\t\t\tB87648A4203E9BBD00B1FA40 /* Info.plist */,\n\t\t\t\tB87648AC203EA27100B1FA40 /* TabCollectionViewCell.swift */,\n\t\t\t\tB87648AD203EA27100B1FA40 /* TabCollectionViewCell.xib */,\n\t\t\t\tB87648AA203E9BE900B1FA40 /* AZSafariLayout.swift */,\n\t\t\t\tB895EBE820401D4600625F57 /* AZExploreLayout.swift */,\n\t\t\t);\n\t\t\tpath = AZTestLayout;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\tB8764894203E9BBD00B1FA40 /* AZTestLayout */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = B87648A7203E9BBD00B1FA40 /* Build configuration list for PBXNativeTarget \"AZTestLayout\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tB8764891203E9BBD00B1FA40 /* Sources */,\n\t\t\t\tB8764892203E9BBD00B1FA40 /* Frameworks */,\n\t\t\t\tB8764893203E9BBD00B1FA40 /* 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 = AZTestLayout;\n\t\t\tproductName = AZTestLayout;\n\t\t\tproductReference = B8764895203E9BBD00B1FA40 /* AZTestLayout.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tB876488D203E9BBD00B1FA40 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0920;\n\t\t\t\tLastUpgradeCheck = 0920;\n\t\t\t\tORGANIZATIONNAME = \"Afroz Zaheer\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tB8764894203E9BBD00B1FA40 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 9.2;\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = B8764890203E9BBD00B1FA40 /* Build configuration list for PBXProject \"AZTestLayout\" */;\n\t\t\tcompatibilityVersion = \"Xcode 8.0\";\n\t\t\tdevelopmentRegion = en;\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 = B876488C203E9BBD00B1FA40;\n\t\t\tproductRefGroup = B8764896203E9BBD00B1FA40 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tB8764894203E9BBD00B1FA40 /* AZTestLayout */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\tB8764893203E9BBD00B1FA40 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tB87648AF203EA27100B1FA40 /* TabCollectionViewCell.xib in Resources */,\n\t\t\t\tB87648A3203E9BBD00B1FA40 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\tB8545A9A2046B92D004F04B7 /* README.md in Resources */,\n\t\t\t\tB87648A0203E9BBD00B1FA40 /* Assets.xcassets in Resources */,\n\t\t\t\tB876489E203E9BBD00B1FA40 /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\tB8764891203E9BBD00B1FA40 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tB87648AE203EA27100B1FA40 /* TabCollectionViewCell.swift in Sources */,\n\t\t\t\tB87648AB203E9BE900B1FA40 /* AZSafariLayout.swift in Sources */,\n\t\t\t\tB876489B203E9BBD00B1FA40 /* ViewController.swift in Sources */,\n\t\t\t\tB8764899203E9BBD00B1FA40 /* AppDelegate.swift in Sources */,\n\t\t\t\tB895EBE920401D4600625F57 /* AZExploreLayout.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\tB876489C203E9BBD00B1FA40 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tB876489D203E9BBD00B1FA40 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB87648A1203E9BBD00B1FA40 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tB87648A2203E9BBD00B1FA40 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tB87648A5203E9BBD00B1FA40 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\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_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 = 11.2;\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\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tB87648A6203E9BBD00B1FA40 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\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_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = 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_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"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 = gnu11;\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 = 11.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tB87648A8203E9BBD00B1FA40 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = CASVKBQG32;\n\t\t\t\tINFOPLIST_FILE = AZTestLayout/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.AfrozZaheer.AZTestLayout;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tB87648A9203E9BBD00B1FA40 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = CASVKBQG32;\n\t\t\t\tINFOPLIST_FILE = AZTestLayout/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.AfrozZaheer.AZTestLayout;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 4.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tB8764890203E9BBD00B1FA40 /* Build configuration list for PBXProject \"AZTestLayout\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tB87648A5203E9BBD00B1FA40 /* Debug */,\n\t\t\t\tB87648A6203E9BBD00B1FA40 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tB87648A7203E9BBD00B1FA40 /* Build configuration list for PBXNativeTarget \"AZTestLayout\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tB87648A8203E9BBD00B1FA40 /* Debug */,\n\t\t\t\tB87648A9203E9BBD00B1FA40 /* 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 = B876488D203E9BBD00B1FA40 /* Project object */;\n}\n"
  },
  {
    "path": "Example/AZTestLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:AZTestLayout.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2017 Afroz Zaheer <afrozezaheer@gmail.com>\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\nall copies 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\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# AZSafariCollectionViewLayout\n\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n[![Swift version](https://img.shields.io/badge/swift%20-4.0-orange.svg)](https://img.shields.io/badge/swift%20-4.0-orange.svg)\n[![Support Dependecy Manager](https://img.shields.io/badge/support-CocoaPods-red.svg?style=flat.svg)](https://img.shields.io/badge/support-CocoaPods-red.svg?style=flat.svg)\n[![Version](https://img.shields.io/cocoapods/v/AZSafariCollectionViewLayout.svg?style=flat)](https://cocoapods.org/pods/AZSafariCollectionViewLayout)\n[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat.svg)](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat.svg)\n[![Platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)](https://cocoapods.org/pods/AZSafariCollectionViewLayout)\n\n\n<p align=\"center\">\n<a href=\"https://i.imgur.com/tgCdFnK.gif\">\n<img src=\"https://i.imgur.com/tgCdFnK.gif\" height=\"480\">\n</a>\n</p>\n\n\n## Features\n\n* iOS Safari history view layout\n* IBDesignAble for properties\n* Few minutes integration\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n\nTo integrate AZSafariCollectionViewLayout controller into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '10.0'\nuse_frameworks!\n\ntarget '<Your Target Name>' do\npod 'AZSafariCollectionViewLayout'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n## Usage\n\n#### Step 1\n\n* Set collectionView layout and give some design properties value.\n```swift\n\nclass ViewController: UIViewController {\n\n    @IBOutlet weak var collectionView: UICollectionView!\n    \n    let exploreLayout = AZExploreCollectionViewLayout()\n    let browsingLayout = AZSafariCollectionViewLayout()\n    \n    var isSelected = false\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        collectionView.register(UINib(nibName: \"TabCollectionViewCell\", bundle: nil), forCellWithReuseIdentifier: \"TabCollectionViewCell\")\n        collectionView.setCollectionViewLayout(browsingLayout, animated: true)\n        browsingLayout.height = (collectionView?.frame.size.height)!\n        browsingLayout.itemGap = 100\n        \n    }\n}\n\n```\n#### OR\n\n* You can set these properties in storyboard\n\n![Alt text](https://i.imgur.com/JyYsQGT.png \"AZSafariCollectionViewLayout\")\n\n#### Done\nThats it, you successfully integrate AZSafariCollectionViewLayout\n\n\n## License\n\nAZSafariCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.\n\n## Author\n\n**Afroz Zaheer** - (https://github.com/AfrozZaheer)\n\n\n"
  },
  {
    "path": "Source/AZSafariCollectionViewLayout.swift",
    "content": "//\n//  AZSafariLayout.swift\n//  AZSafariLayout\n//\n//  Created by Afroz Zaheer on 22/02/2018.\n//  Copyright © 2018 Afroz Zaheer. All rights reserved.\n//\n\nimport UIKit\n\npublic class AZSafariCollectionViewLayout: UICollectionViewLayout {\n    \n    var attributes  = Array<UICollectionViewLayoutAttributes>()\n    var contentSize: CGSize = CGSize(width: 0, height: 0)\n    @IBInspectable public var itemGap: CGFloat = 50\n    @IBInspectable public var itemHeight : CGFloat = 0\n    @IBInspectable public var itemAngleOfRotation : CGFloat = -30\n    \n    override public init() {\n        super.init()\n    }\n    \n    required public init?(coder aDecoder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    override public func prepare() {\n        super.prepare()\n\n        if collectionView?.numberOfSections != 1 {\n            return\n        }\n        //itemGap = CGFloat(roundf(Float(self.collectionView!.frame.size.height*0.1)))\n        \n        var top = CGFloat(0.0)\n        let left = CGFloat(0.0)\n        let width = collectionView?.frame.size.width\n        self.contentSize = CGSize(width: width!, height: itemHeight)\n        guard let limit = collectionView?.numberOfItems(inSection: 0) else {\n            return\n        }\n        \n        for item in 0..<limit {\n            let indexPath = IndexPath(item: item, section: 0)\n            let attribute = UICollectionViewLayoutAttributes(forCellWith: indexPath)\n            let frame = CGRect(x: left, y: top, width: width!, height: itemHeight)\n            \n            attribute.frame = frame\n            attribute.zIndex = item\n            \n            var angleOfRotation = itemAngleOfRotation\n            \n            var frameOffset = Float((self.collectionView?.contentOffset.y)! - frame.origin.y) - floorf(Float(self.collectionView!.frame.size.height/10.0))\n            \n            if frameOffset > 0 {\n                frameOffset = frameOffset/5.0\n                frameOffset = min(frameOffset, 30.0)\n                angleOfRotation += CGFloat(frameOffset)\n            }\n            \n            let rotation = CATransform3DMakeRotation((CGFloat.pi*angleOfRotation/180.0), 1.0, 0.0, 0.0)\n            \n            let depth = CGFloat(250.0)\n            let translateDown = CATransform3DMakeTranslation(0.0, 0.0, -depth)\n            let translateUp = CATransform3DMakeTranslation(0.0, 0.0, depth)\n            var scale = CATransform3DIdentity\n            scale.m34 = -1.0/1500.0\n            let perspective =  CATransform3DConcat(CATransform3DConcat(translateDown, scale), translateUp)\n            let  transform = CATransform3DConcat(rotation, perspective)\n            \n            \n            let gap = self.itemGap\n            attribute.transform3D = transform\n            self.attributes.append(attribute)\n            \n            top += gap\n            \n        }\n        if self.attributes.count > 0 {\n            let lastItemAttributes = self.attributes.last\n            let newHeight = (lastItemAttributes?.frame.origin.y)! + (lastItemAttributes?.frame.size.height)! + 20\n            let newWidth = (self.collectionView?.frame.size.width)!\n            \n            self.contentSize = CGSize(width: newWidth, height: newHeight)\n        }\n    }\n    \n    override public var collectionViewContentSize: CGSize {\n        return self.contentSize\n    }\n\n    override public func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {\n        \n        var visibleLayoutAttributes = [UICollectionViewLayoutAttributes]()\n        \n        for attributes in self.attributes {\n            if attributes.frame.intersects(rect) {\n                visibleLayoutAttributes.append(attributes)\n            }\n        }\n        return visibleLayoutAttributes\n    }\n    \n    override public func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n       \n        return self.attributes[indexPath.item]\n    }\n    \n    override public func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {\n        return true\n    }\n    \n    override public func initialLayoutAttributesForAppearingItem(at itemIndexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        return self.attributes[itemIndexPath.item]\n    }\n    \n}\n\n\n\n\n\n\n\n\n"
  }
]