[
  {
    "path": ".gitignore",
    "content": ".DS_Store\n*.swp\n*~.nib\nPods\nbuild/\nxcuserdata/\n*.pbxuser\n*.perspective\n*.perspectivev3\n"
  },
  {
    "path": ".swift-version",
    "content": "3.0\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright © 2015 ltebean\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n(MIT License)"
  },
  {
    "path": "LTInfiniteScrollView-Swift/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  LTInfiniteScrollView-Swift\n//\n//  Created by ltebean on 16/1/8.\n//  Copyright © 2016年 io. 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 throttle down OpenGL ES frame rates. 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 inactive 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\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift/Assets.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  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "LTInfiniteScrollView-Swift/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=\"9531\" systemVersion=\"14F27\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" initialViewController=\"BYZ-38-t0r\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"9529\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" customModule=\"LTInfiniteScrollView_Swift\" customModuleProvider=\"target\" 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=\"320\" height=\"568\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yzD-Zb-f12\" customClass=\"LTInfiniteScrollView\" customModule=\"LTInfiniteScrollView_Swift\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"220\" width=\"320\" height=\"128\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"128\" id=\"Arm-FM-Q2S\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"yzD-Zb-f12\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leading\" id=\"1cl-oU-8xe\"/>\n                            <constraint firstItem=\"yzD-Zb-f12\" firstAttribute=\"centerY\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"centerY\" id=\"88N-GS-iDO\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"yzD-Zb-f12\" secondAttribute=\"trailing\" id=\"grk-R4-pPJ\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"scrollView\" destination=\"yzD-Zb-f12\" id=\"2tL-BZ-Una\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"254\" y=\"519\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift/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>$(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>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>Lauch</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</dict>\n</plist>\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift/Lauch.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"6211\" systemVersion=\"14A298i\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6204\"/>\n    </dependencies>\n    <scenes/>\n</document>\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift/Sources/LTInfiniteScrollView.swift",
    "content": "//\n//  LTInfiniteScrollView.swift\n//  LTInfiniteScrollView-Swift\n//\n//  Created by ltebean on 16/1/8.\n//  Copyright © 2016年 io. All rights reserved.\n//\n\nimport UIKit\n\npublic protocol LTInfiniteScrollViewDelegate: class {\n    func updateView(_ view: UIView, withProgress progress: CGFloat, scrollDirection direction: LTInfiniteScrollView.ScrollDirection)\n    func scrollViewDidScrollToIndex(_ scrollView: LTInfiniteScrollView, index: Int)\n}\n\npublic protocol LTInfiniteScrollViewDataSource: class {\n    func viewAtIndex(_ index: Int, reusingView view: UIView?) -> UIView\n    func numberOfViews() -> Int\n    func numberOfVisibleViews() -> Int\n}\n\n\nopen class LTInfiniteScrollView: UIView {\n    \n    public enum ScrollDirection {\n        case previous\n        case next\n    }\n    \n    override public init(frame: CGRect) {\n        super.init(frame: frame)\n        self.setup()\n    }\n    \n    required public init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n        self.setup()\n    }\n        \n    open var pagingEnabled = false {\n        didSet {\n            scrollView.isPagingEnabled = pagingEnabled\n        }\n    }\n    \n    open var bounces = false {\n        didSet {\n            scrollView.bounces = bounces\n        }\n    }\n    \n    open var contentInset = UIEdgeInsets.zero {\n        didSet {\n            scrollView.contentInset = contentInset;\n        }\n    }\n    \n    open var scrollEnabled = false {\n        didSet {\n            scrollView.isScrollEnabled = scrollEnabled\n        }\n    }\n    \n    open var maxScrollDistance: Int?\n    \n    open fileprivate(set) var currentIndex = 0\n    \n    fileprivate var scrollView: UIScrollView!\n    fileprivate var viewSize: CGSize!\n    fileprivate var visibleViewCount = 0\n    fileprivate var totalViewCount = 0\n    fileprivate var preContentOffsetX: CGFloat = 0\n    fileprivate var totalWidth: CGFloat = 0\n    fileprivate var scrollDirection: ScrollDirection = .next\n    fileprivate var views: [Int: UIView] = [:]\n    \n    open weak var delegate: LTInfiniteScrollViewDelegate?\n    open var dataSource: LTInfiniteScrollViewDataSource!\n    \n    // MARK: public func\n    open func reloadData(initialIndex: Int=0) {\n        for view in scrollView.subviews {\n            view.removeFromSuperview()\n        }\n        visibleViewCount = dataSource.numberOfVisibleViews()\n        totalViewCount = dataSource.numberOfViews()\n        updateContentSize()\n        views = [:]\n        currentIndex = initialIndex\n        scrollView.contentOffset = contentOffsetForIndex(currentIndex)\n        reArrangeViews()\n        updateProgress()\n    }\n    \n    open func scrollToIndex(_ index: Int, animated: Bool) {\n        if index < currentIndex {\n            scrollDirection = .previous\n        }\n        else {\n            scrollDirection = .next\n        }\n        scrollView.setContentOffset(contentOffsetForIndex(index), animated: animated)\n    }\n    \n    open func viewAtIndex(_ index: Int) -> UIView? {\n        return views[index]\n    }\n    \n    open func allViews() -> [UIView] {\n        return [UIView](views.values)\n    }\n    \n    open override func layoutSubviews() {\n        let index = currentIndex;\n        super.layoutSubviews()\n        scrollView.frame = bounds\n        updateContentSize()\n        for (index, view) in views {\n            view.center = self.centerForViewAtIndex(index)\n        }\n        scrollToIndex(index, animated: false)\n        updateProgress()\n    }\n    \n    // MARK: private func\n    fileprivate func setup() {\n        scrollView = UIScrollView(frame: CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.height))\n        scrollView.autoresizingMask = [UIViewAutoresizing.flexibleWidth, UIViewAutoresizing.flexibleHeight]\n        scrollView.showsHorizontalScrollIndicator = false\n        scrollView.delegate = self\n        scrollView.clipsToBounds = false\n        addSubview(self.scrollView)\n    }\n    \n    \n    fileprivate func updateContentSize() {\n        let viewWidth = bounds.width / CGFloat(visibleViewCount)\n        let viewHeight: CGFloat = bounds.height\n        viewSize = CGSize(width: viewWidth, height: viewHeight)\n        totalWidth = viewWidth * CGFloat(totalViewCount)\n        scrollView.contentSize = CGSize(width: self.totalWidth, height: self.bounds.height)\n    }\n    \n    fileprivate func reArrangeViews() {\n        var indexesNeeded = Set<Int>()\n        let begin = currentIndex - Int(ceil(Double(visibleViewCount) / 2.0))\n        let end = currentIndex + Int(ceil(Double(visibleViewCount) / 2.0))\n        for i in begin...end {\n            if i < 0 {\n                let index = end - i\n                if index < totalViewCount {\n                    indexesNeeded.insert(index)\n                }\n            }\n            else if i >= totalViewCount {\n                let index = begin - i\n                if index >= 0 {\n                    indexesNeeded.insert(index)\n                }\n            }\n            else {\n                indexesNeeded.insert(i)\n            }\n        }\n        for indexNeeded in indexesNeeded {\n            var view = views[indexNeeded]\n            if view != nil {\n                continue\n            }\n            let currentIndexes = [Int](views.keys)\n            for index in currentIndexes {\n                if !indexesNeeded.contains(index) {\n                    view = views[index]\n                    views.removeValue(forKey: index)\n                    break\n                }\n            }\n            let viewNeeded = dataSource.viewAtIndex(indexNeeded, reusingView: view)\n            viewNeeded.removeFromSuperview()\n            viewNeeded.tag = indexNeeded\n            viewNeeded.center = self.centerForViewAtIndex(indexNeeded)\n            views[indexNeeded] = viewNeeded\n            scrollView.addSubview(viewNeeded)\n        }\n    }\n    \n    fileprivate func updateProgress() {\n        guard let delegate = delegate else {\n            return\n        }\n        let currentCenterX = currentCenter().x\n        for view in allViews() {\n            let progress = (view.center.x - currentCenterX) / bounds.width * CGFloat(visibleViewCount)\n            delegate.updateView(view, withProgress: progress, scrollDirection: scrollDirection)\n        }\n    }\n    \n\n    \n    // MARK: helper\n    fileprivate func needsCenterPage() -> Bool {\n        let offsetX = scrollView.contentOffset.x\n        if offsetX < -scrollView.contentInset.left || offsetX > scrollView.contentSize.width - viewSize.width {\n            return false\n        }\n        else {\n            return true\n        }\n    }\n    \n    fileprivate func currentCenter() -> CGPoint {\n        let x = scrollView.contentOffset.x + bounds.width / 2.0\n        let y = scrollView.contentOffset.y\n        return CGPoint(x: x, y: y)\n    }\n    \n    fileprivate func contentOffsetForIndex(_ index: Int) -> CGPoint {\n        let centerX = centerForViewAtIndex(index).x\n        var x: CGFloat = centerX - self.bounds.width / 2.0\n        x = max(-scrollView.contentInset.left, x)\n        x = min(x, scrollView.contentSize.width)\n        return CGPoint(x: x, y: 0)\n    }\n    \n    fileprivate func centerForViewAtIndex(_ index: Int) -> CGPoint {\n        let y = bounds.midY\n        let x = CGFloat(index) * viewSize.width + viewSize.width / 2\n        return CGPoint(x: x, y: y)\n    }\n    \n    fileprivate func didScrollToIndex(_ index : Int) {\n        delegate?.scrollViewDidScrollToIndex(self, index: index)\n    }\n}\n\n\nextension LTInfiniteScrollView: UIScrollViewDelegate {\n    \n    public func scrollViewDidScroll(_ scrollView: UIScrollView) {\n        if viewSize == nil {\n            return\n        }\n        let currentCenterX = currentCenter().x\n        let offsetX = scrollView.contentOffset.x\n        currentIndex = Int(round((currentCenterX - viewSize.width / 2) / viewSize.width))\n        if offsetX > preContentOffsetX {\n            scrollDirection = .next\n        }\n        else {\n            scrollDirection = .previous\n        }\n        preContentOffsetX = offsetX\n        reArrangeViews()\n        updateProgress()\n    }\n    \n    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {\n        if !pagingEnabled && !decelerate && needsCenterPage() {\n            let offsetX = scrollView.contentOffset.x\n            if offsetX < 0 || offsetX > scrollView.contentSize.width {\n                return\n            }\n            scrollView.setContentOffset(contentOffsetForIndex(currentIndex), animated: true)\n            didScrollToIndex(currentIndex)\n        }\n    }\n    \n    public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {\n        if !pagingEnabled && needsCenterPage() {\n            scrollView.setContentOffset(contentOffsetForIndex(currentIndex), animated: true)\n        }\n        didScrollToIndex(currentIndex)\n    }\n    \n    public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {\n    \n        guard let maxScrollDistance = maxScrollDistance , maxScrollDistance > 0 else {\n            return\n        }\n        guard needsCenterPage() else {\n            return\n        }\n        let targetX = targetContentOffset.pointee.x\n        let currentX = contentOffsetForIndex(currentIndex).x\n        if fabs(targetX - currentX) <= viewSize.width / 2 {\n            targetContentOffset.pointee.x = contentOffsetForIndex(currentIndex).x\n        }\n        else {\n            let distance = maxScrollDistance - 1\n            var targetIndex = scrollDirection == .next ? currentIndex + distance : currentIndex - distance\n            targetIndex = max(0, targetIndex)\n            targetContentOffset.pointee.x = contentOffsetForIndex(targetIndex).x\n        }\n    }\n}\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift/ViewController.swift",
    "content": "//\n//  ViewController.swift\n//  LTInfiniteScrollView-Swift\n//\n//  Created by ltebean on 16/1/8.\n//  Copyright © 2016年 io. All rights reserved.\n//\n\nimport UIKit\n\nclass ViewController: UIViewController {\n\n    let screenWidth = UIScreen.main.bounds.size.width\n    \n    @IBOutlet weak var scrollView: LTInfiniteScrollView!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // Do any additional setup after loading the view, typically from a nib.\n        scrollView.dataSource = self\n        scrollView.delegate = self\n        scrollView.maxScrollDistance = 5\n        \n        let size = screenWidth / CGFloat(numberOfVisibleViews())\n        \n        scrollView.contentInset.left = screenWidth / 2 - size / 2\n        scrollView.contentInset.right = screenWidth / 2 - size / 2\n        \n        view.addSubview(scrollView)\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        super.viewWillAppear(animated)\n        scrollView.reloadData(initialIndex: 0)\n        \n\n    }\n}\n\nextension ViewController: LTInfiniteScrollViewDataSource {\n\n    func viewAtIndex(_ index: Int, reusingView view: UIView?) -> UIView {\n        if let label = view as? UILabel {\n            label.text = \"\\(index)\"\n            return label\n        }\n        else {\n            let size = screenWidth / CGFloat(numberOfVisibleViews())\n            let label = UILabel(frame: CGRect(x: 0, y: 0, width: size, height: size))\n            label.textAlignment = .center\n            label.backgroundColor = UIColor.darkGray\n            label.textColor = UIColor.white\n            label.layer.cornerRadius = size / 2\n            label.layer.masksToBounds = true\n            label.text = \"\\(index)\"\n            return label\n        }\n    }\n    \n    func numberOfViews() -> Int {\n        return 10\n    }\n    \n    func numberOfVisibleViews() -> Int {\n        return 5\n    }\n}\n\nextension ViewController: LTInfiniteScrollViewDelegate {\n    \n    func updateView(_ view: UIView, withProgress progress: CGFloat, scrollDirection direction: LTInfiniteScrollView.ScrollDirection) {\n        let size = screenWidth / CGFloat(numberOfVisibleViews())\n\n        var transform = CGAffineTransform.identity\n        // scale\n        let scale = (1.4 - 0.3 * (fabs(progress)))\n        transform = transform.scaledBy(x: scale, y: scale)\n        \n        // translate\n        var translate = size / 4 * progress\n        if progress > 1 {\n            translate = size / 4\n        }\n        else if progress < -1 {\n            translate = -size / 4\n        }\n        transform = transform.translatedBy(x: translate, y: 0)\n        \n        view.transform = transform\n    }\n    \n    func scrollViewDidScrollToIndex(_ scrollView: LTInfiniteScrollView, index: Int) {\n        print(\"scroll to index: \\(index)\")\n    }\n}\n\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift.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\tFA6635951C50BF8A00A12676 /* Lauch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA6635941C50BF8A00A12676 /* Lauch.storyboard */; };\n\t\tFAA51EA41C3F7E9D00CD7F5A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA51EA31C3F7E9D00CD7F5A /* AppDelegate.swift */; };\n\t\tFAA51EA61C3F7E9D00CD7F5A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA51EA51C3F7E9D00CD7F5A /* ViewController.swift */; };\n\t\tFAA51EA91C3F7E9D00CD7F5A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAA51EA71C3F7E9D00CD7F5A /* Main.storyboard */; };\n\t\tFAA51EAB1C3F7E9D00CD7F5A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FAA51EAA1C3F7E9D00CD7F5A /* Assets.xcassets */; };\n\t\tFAA51EB71C3F7EE400CD7F5A /* LTInfiniteScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA51EB61C3F7EE400CD7F5A /* LTInfiniteScrollView.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\tFA6635941C50BF8A00A12676 /* Lauch.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Lauch.storyboard; sourceTree = \"<group>\"; };\n\t\tFAA51EA01C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"LTInfiniteScrollView-Swift.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tFAA51EA31C3F7E9D00CD7F5A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\tFAA51EA51C3F7E9D00CD7F5A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = \"<group>\"; };\n\t\tFAA51EA81C3F7E9D00CD7F5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\tFAA51EAA1C3F7E9D00CD7F5A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\tFAA51EAF1C3F7E9D00CD7F5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tFAA51EB61C3F7EE400CD7F5A /* LTInfiniteScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LTInfiniteScrollView.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tFAA51E9D1C3F7E9D00CD7F5A /* 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\tFAA51E971C3F7E9D00CD7F5A = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFAA51EA21C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift */,\n\t\t\t\tFAA51EA11C3F7E9D00CD7F5A /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tFAA51EA11C3F7E9D00CD7F5A /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFAA51EA01C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tFAA51EA21C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFAA51EB51C3F7EAA00CD7F5A /* Sources */,\n\t\t\t\tFAA51EA31C3F7E9D00CD7F5A /* AppDelegate.swift */,\n\t\t\t\tFAA51EA51C3F7E9D00CD7F5A /* ViewController.swift */,\n\t\t\t\tFAA51EA71C3F7E9D00CD7F5A /* Main.storyboard */,\n\t\t\t\tFA6635941C50BF8A00A12676 /* Lauch.storyboard */,\n\t\t\t\tFAA51EAA1C3F7E9D00CD7F5A /* Assets.xcassets */,\n\t\t\t\tFAA51EAF1C3F7E9D00CD7F5A /* Info.plist */,\n\t\t\t);\n\t\t\tpath = \"LTInfiniteScrollView-Swift\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tFAA51EB51C3F7EAA00CD7F5A /* Sources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFAA51EB61C3F7EE400CD7F5A /* LTInfiniteScrollView.swift */,\n\t\t\t);\n\t\t\tpath = Sources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\tFAA51E9F1C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = FAA51EB21C3F7E9D00CD7F5A /* Build configuration list for PBXNativeTarget \"LTInfiniteScrollView-Swift\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tFAA51E9C1C3F7E9D00CD7F5A /* Sources */,\n\t\t\t\tFAA51E9D1C3F7E9D00CD7F5A /* Frameworks */,\n\t\t\t\tFAA51E9E1C3F7E9D00CD7F5A /* 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 = \"LTInfiniteScrollView-Swift\";\n\t\t\tproductName = \"LTInfiniteScrollView-Swift\";\n\t\t\tproductReference = FAA51EA01C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tFAA51E981C3F7E9D00CD7F5A /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0710;\n\t\t\t\tLastUpgradeCheck = 0800;\n\t\t\t\tORGANIZATIONNAME = io;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tFAA51E9F1C3F7E9D00CD7F5A = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = FAA51E9B1C3F7E9D00CD7F5A /* Build configuration list for PBXProject \"LTInfiniteScrollView-Swift\" */;\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 = FAA51E971C3F7E9D00CD7F5A;\n\t\t\tproductRefGroup = FAA51EA11C3F7E9D00CD7F5A /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tFAA51E9F1C3F7E9D00CD7F5A /* LTInfiniteScrollView-Swift */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\tFAA51E9E1C3F7E9D00CD7F5A /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tFAA51EAB1C3F7E9D00CD7F5A /* Assets.xcassets in Resources */,\n\t\t\t\tFA6635951C50BF8A00A12676 /* Lauch.storyboard in Resources */,\n\t\t\t\tFAA51EA91C3F7E9D00CD7F5A /* 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\tFAA51E9C1C3F7E9D00CD7F5A /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tFAA51EB71C3F7EE400CD7F5A /* LTInfiniteScrollView.swift in Sources */,\n\t\t\t\tFAA51EA61C3F7E9D00CD7F5A /* ViewController.swift in Sources */,\n\t\t\t\tFAA51EA41C3F7E9D00CD7F5A /* AppDelegate.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\tFAA51EA71C3F7E9D00CD7F5A /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tFAA51EA81C3F7E9D00CD7F5A /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tFAA51EB01C3F7E9D00CD7F5A /* 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_INFINITE_RECURSION = 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_SUSPICIOUS_MOVE = YES;\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;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = 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_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 = 9.1;\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_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tFAA51EB11C3F7E9D00CD7F5A /* 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_INFINITE_RECURSION = 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_SUSPICIOUS_MOVE = YES;\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 = 9.1;\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\tFAA51EB31C3F7E9D00CD7F5A /* 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 = \"LTInfiniteScrollView-Swift/Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"ltebean.LTInfiniteScrollView-Swift\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tFAA51EB41C3F7E9D00CD7F5A /* 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 = \"LTInfiniteScrollView-Swift/Info.plist\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"ltebean.LTInfiniteScrollView-Swift\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tFAA51E9B1C3F7E9D00CD7F5A /* Build configuration list for PBXProject \"LTInfiniteScrollView-Swift\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tFAA51EB01C3F7E9D00CD7F5A /* Debug */,\n\t\t\t\tFAA51EB11C3F7E9D00CD7F5A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tFAA51EB21C3F7E9D00CD7F5A /* Build configuration list for PBXNativeTarget \"LTInfiniteScrollView-Swift\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tFAA51EB31C3F7E9D00CD7F5A /* Debug */,\n\t\t\t\tFAA51EB41C3F7E9D00CD7F5A /* 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 = FAA51E981C3F7E9D00CD7F5A /* Project object */;\n}\n"
  },
  {
    "path": "LTInfiniteScrollView-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:LTInfiniteScrollView-Swift.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "LTInfiniteScrollViewSwift.podspec",
    "content": "\nPod::Spec.new do |s|\n  s.name         = \"LTInfiniteScrollViewSwift\"\n  s.version      = \"0.5.0\"\n  s.summary      = \"An infinite scrollview allowing easily applying animation\"\n  s.homepage     = \"https://github.com/ltebean/LTInfiniteScrollView-Swift\"\n  s.license      = \"MIT\"\n  s.author       = { \"ltebean\" => \"yucong1118@gmail.com\" }\n  s.source       = { :git => \"https://github.com/ltebean/LTInfiniteScrollView-Swift.git\", :tag => 'v0.5.0'}\n  s.source_files = \"LTInfiniteScrollView-Swift/Sources/LTInfiniteScrollView.swift\"\n  s.requires_arc = true\n  s.platform     = :ios, '8.0'\n\nend\n"
  },
  {
    "path": "README.md",
    "content": "![LTInfiniteScrollViewSwift](https://cocoapod-badges.herokuapp.com/v/LTInfiniteScrollViewSwift/badge.png)\n\n## Demo\n##### 1. You can apply animation to each view during the scroll:\n![LTInfiniteScrollView](https://raw.githubusercontent.com/ltebean/LTInfiniteScrollView/master/demo/demo.gif)\n\n##### 2. The iOS 9 task switcher animation can be implemented in ten minutes with the support of this lib:\n![LTInfiniteScrollView](https://raw.githubusercontent.com/ltebean/LTInfiniteScrollView/master/demo/task-switcher-demo.gif)\n\n\n##### 3. The fancy menu can also be implemented easily:\n![LTInfiniteScrollView](https://raw.githubusercontent.com/ltebean/LTInfiniteScrollView/master/demo/menu-demo.gif)\n\nYou can find the full demo in the Objective-C version: https://github.com/ltebean/LTInfiniteScrollView.\n\n## Installation\n```\npod 'LTInfiniteScrollViewSwift'\n```\n\nOr just copy `LTInfiniteScrollView.swift` into your project.\n\n\n## Usage\n\nYou can create the scroll view by:\n```swift\nscrollView = LTInfiniteScrollView(frame: CGRect(x: 0, y: 200, width: screenWidth, height: 300))\nscrollView.dataSource = self\nscrollView.delegate = self\nscrollView.maxScrollDistance = 5\nscrollView.reloadData(initialIndex: 0)\n```\n\nThen implement `LTInfiniteScrollViewDataSource` protocol:\n```swift\npublic protocol LTInfiniteScrollViewDataSource: class {\n    func viewAtIndex(index: Int, reusingView view: UIView?) -> UIView\n    func numberOfViews() -> Int\n    func numberOfVisibleViews() -> Int\n}\n```\n\nSample code:\n```swift\nfunc numberOfViews() -> Int {\n    return 100\n}\n    \nfunc numberOfVisibleViews() -> Int {\n    return 5\n}\n\nfunc viewAtIndex(index: Int, reusingView view: UIView?) -> UIView {\n    if let label = view as? UILabel {\n        label.text = \"\\(index)\"\n        return label\n    }\n    else {\n        let size = screenWidth / CGFloat(numberOfVisibleViews())\n        let label = UILabel(frame: CGRect(x: 0, y: 0, width: size, height: size))\n        label.textAlignment = .Center\n        label.backgroundColor = UIColor.darkGrayColor()\n        label.textColor = UIColor.whiteColor()\n        label.layer.cornerRadius = size / 2\n        label.layer.masksToBounds = true\n        label.text = \"\\(index)\"\n        return label\n    }\n}\n```\n\n\nIf you want to apply any animation during scrolling, implement `LTInfiniteScrollViewDelegate` protocol: \n```swift\npublic protocol LTInfiniteScrollViewDelegate: class {\n    func updateView(view: UIView, withProgress progress: CGFloat, scrollDirection direction: ScrollDirection)\n}\n\n```\nThe value of progress dependends on the position of that view, if there are 5 visible views, the value will be ranged from -2 to 2:\n```\n|                  |\n|-2  -1   0   1   2|\n|                  |\n```\n\nYou can clone the project and investigate the example for details. \n"
  }
]