2 Commits

Author SHA1 Message Date
hyyk224 5ae841aeef Created files 2016-01-04 05:39:05 +09:00
hyyk224 573005104f Initial commit 2016-01-04 03:06:42 +09:00
32 changed files with 285 additions and 373 deletions
+28 -28
View File
@@ -8,29 +8,29 @@
/* Begin PBXBuildFile section */
49588A0F5E1A5829806CF162 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C685BA161AB98E8D668D2F26 /* Pods.framework */; };
9349943A1C399D70006C4B97 /* Pattern1ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 934994391C399D70006C4B97 /* Pattern1ViewController.swift */; };
9349943C1C399D99006C4B97 /* Pattern1.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9349943B1C399D99006C4B97 /* Pattern1.storyboard */; };
9349943F1C39A5B9006C4B97 /* ImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9349943D1C39A5B9006C4B97 /* ImageCollectionViewCell.swift */; };
934994401C39A5B9006C4B97 /* ImageCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9349943E1C39A5B9006C4B97 /* ImageCollectionViewCell.xib */; };
934994421C39B0F4006C4B97 /* Pattern2ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 934994411C39B0F4006C4B97 /* Pattern2ViewController.swift */; };
934994441C39B102006C4B97 /* Pattern2.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 934994431C39B102006C4B97 /* Pattern2.storyboard */; };
9349943A1C399D70006C4B97 /* IntroViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 934994391C399D70006C4B97 /* IntroViewController.swift */; };
9349943C1C399D99006C4B97 /* Intro.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9349943B1C399D99006C4B97 /* Intro.storyboard */; };
9349943F1C39A5B9006C4B97 /* IntroCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9349943D1C39A5B9006C4B97 /* IntroCollectionViewCell.swift */; };
934994401C39A5B9006C4B97 /* IntroCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9349943E1C39A5B9006C4B97 /* IntroCollectionViewCell.xib */; };
934994421C39B0F4006C4B97 /* SecoundViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 934994411C39B0F4006C4B97 /* SecoundViewController.swift */; };
934994441C39B102006C4B97 /* Secound.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 934994431C39B102006C4B97 /* Secound.storyboard */; };
93DC8E391BD232CA004BCCBC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93DC8E381BD232CA004BCCBC /* AppDelegate.swift */; };
93DC8E3B1BD232CA004BCCBC /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93DC8E3A1BD232CA004BCCBC /* MainViewController.swift */; };
93DC8E3B1BD232CA004BCCBC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93DC8E3A1BD232CA004BCCBC /* ViewController.swift */; };
93DC8E3E1BD232CA004BCCBC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93DC8E3C1BD232CA004BCCBC /* Main.storyboard */; };
93DC8E401BD232CA004BCCBC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93DC8E3F1BD232CA004BCCBC /* Assets.xcassets */; };
93DC8E431BD232CA004BCCBC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93DC8E411BD232CA004BCCBC /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
934994391C399D70006C4B97 /* Pattern1ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pattern1ViewController.swift; sourceTree = "<group>"; };
9349943B1C399D99006C4B97 /* Pattern1.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Pattern1.storyboard; sourceTree = "<group>"; };
9349943D1C39A5B9006C4B97 /* ImageCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCollectionViewCell.swift; sourceTree = "<group>"; };
9349943E1C39A5B9006C4B97 /* ImageCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImageCollectionViewCell.xib; sourceTree = "<group>"; };
934994411C39B0F4006C4B97 /* Pattern2ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pattern2ViewController.swift; sourceTree = "<group>"; };
934994431C39B102006C4B97 /* Pattern2.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Pattern2.storyboard; sourceTree = "<group>"; };
934994391C399D70006C4B97 /* IntroViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntroViewController.swift; sourceTree = "<group>"; };
9349943B1C399D99006C4B97 /* Intro.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Intro.storyboard; sourceTree = "<group>"; };
9349943D1C39A5B9006C4B97 /* IntroCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntroCollectionViewCell.swift; sourceTree = "<group>"; };
9349943E1C39A5B9006C4B97 /* IntroCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IntroCollectionViewCell.xib; sourceTree = "<group>"; };
934994411C39B0F4006C4B97 /* SecoundViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecoundViewController.swift; sourceTree = "<group>"; };
934994431C39B102006C4B97 /* Secound.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Secound.storyboard; sourceTree = "<group>"; };
93DC8E351BD232CA004BCCBC /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
93DC8E381BD232CA004BCCBC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
93DC8E3A1BD232CA004BCCBC /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
93DC8E3A1BD232CA004BCCBC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
93DC8E3D1BD232CA004BCCBC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
93DC8E3F1BD232CA004BCCBC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
93DC8E421BD232CA004BCCBC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -74,14 +74,14 @@
isa = PBXGroup;
children = (
93DC8E381BD232CA004BCCBC /* AppDelegate.swift */,
93DC8E3A1BD232CA004BCCBC /* MainViewController.swift */,
93DC8E3A1BD232CA004BCCBC /* ViewController.swift */,
934994411C39B0F4006C4B97 /* SecoundViewController.swift */,
934994431C39B102006C4B97 /* Secound.storyboard */,
934994391C399D70006C4B97 /* IntroViewController.swift */,
9349943D1C39A5B9006C4B97 /* IntroCollectionViewCell.swift */,
9349943E1C39A5B9006C4B97 /* IntroCollectionViewCell.xib */,
93DC8E3C1BD232CA004BCCBC /* Main.storyboard */,
934994391C399D70006C4B97 /* Pattern1ViewController.swift */,
9349943B1C399D99006C4B97 /* Pattern1.storyboard */,
934994411C39B0F4006C4B97 /* Pattern2ViewController.swift */,
934994431C39B102006C4B97 /* Pattern2.storyboard */,
9349943D1C39A5B9006C4B97 /* ImageCollectionViewCell.swift */,
9349943E1C39A5B9006C4B97 /* ImageCollectionViewCell.xib */,
9349943B1C399D99006C4B97 /* Intro.storyboard */,
93DC8E3F1BD232CA004BCCBC /* Assets.xcassets */,
93DC8E411BD232CA004BCCBC /* LaunchScreen.storyboard */,
93DC8E441BD232CA004BCCBC /* Info.plist */,
@@ -168,10 +168,10 @@
files = (
93DC8E431BD232CA004BCCBC /* LaunchScreen.storyboard in Resources */,
93DC8E401BD232CA004BCCBC /* Assets.xcassets in Resources */,
934994441C39B102006C4B97 /* Pattern2.storyboard in Resources */,
934994401C39A5B9006C4B97 /* ImageCollectionViewCell.xib in Resources */,
934994441C39B102006C4B97 /* Secound.storyboard in Resources */,
934994401C39A5B9006C4B97 /* IntroCollectionViewCell.xib in Resources */,
93DC8E3E1BD232CA004BCCBC /* Main.storyboard in Resources */,
9349943C1C399D99006C4B97 /* Pattern1.storyboard in Resources */,
9349943C1C399D99006C4B97 /* Intro.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -230,11 +230,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9349943A1C399D70006C4B97 /* Pattern1ViewController.swift in Sources */,
93DC8E3B1BD232CA004BCCBC /* MainViewController.swift in Sources */,
934994421C39B0F4006C4B97 /* Pattern2ViewController.swift in Sources */,
9349943A1C399D70006C4B97 /* IntroViewController.swift in Sources */,
93DC8E3B1BD232CA004BCCBC /* ViewController.swift in Sources */,
934994421C39B0F4006C4B97 /* SecoundViewController.swift in Sources */,
93DC8E391BD232CA004BCCBC /* AppDelegate.swift in Sources */,
9349943F1C39A5B9006C4B97 /* ImageCollectionViewCell.swift in Sources */,
9349943F1C39A5B9006C4B97 /* IntroCollectionViewCell.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 MiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "4.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "5.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "6.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 MiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "7.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 KiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "8.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 MiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "9.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
+2 -2
View File
@@ -21,10 +21,10 @@
</objects>
<point key="canvasLocation" x="-460" y="511"/>
</scene>
<!--Main View Controller-->
<!--View Controller-->
<scene sceneID="1Kl-4d-wQ0">
<objects>
<viewController id="9lV-Re-kOd" customClass="MainViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="9lV-Re-kOd" customClass="ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="2b4-Bh-NFz"/>
<viewControllerLayoutGuide type="bottom" id="WMJ-rH-CQa"/>
@@ -5,10 +5,10 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Pattern1 View Controller-->
<!--Intro View Controller-->
<scene sceneID="w99-5n-3Mx">
<objects>
<viewController automaticallyAdjustsScrollViewInsets="NO" id="jtB-7l-rQl" customClass="Pattern1ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController automaticallyAdjustsScrollViewInsets="NO" id="jtB-7l-rQl" customClass="IntroViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Vix-Nr-Wbb"/>
<viewControllerLayoutGuide type="bottom" id="rTP-xN-QW3"/>
@@ -17,10 +17,9 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Lwf-cA-VEr" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Lwf-cA-VEr" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="9XM-Ng-ou9">
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="9XM-Ng-ou9">
<size key="itemSize" width="600" height="600"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
@@ -1,5 +1,5 @@
//
// ImageCollectionViewCell.swift
// IntroCollectionViewCell.swift
// Example
//
// Created by hiroyuki yoshida on 2016/01/04.
@@ -8,10 +8,10 @@
import UIKit
final class ImageCollectionViewCell: UICollectionViewCell {
final class IntroCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView!
static let identifier = "ImageCollectionViewCell"
static let nib = UINib(nibName: "ImageCollectionViewCell", bundle: nil)
static let identifier = "IntroCollectionViewCell"
static let nib = UINib(nibName: "IntroCollectionViewCell", bundle: nil)
func configure(dequeueIndexPath dequeueIndexPath: NSIndexPath) {
let image = UIImage(named: String(dequeueIndexPath.row))
imageView.image = image
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ImageCollectionViewCell" id="gTV-IL-0wX" customClass="ImageCollectionViewCell" customModule="Example" customModuleProvider="target">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="IntroCollectionViewCell" id="gTV-IL-0wX" customClass="IntroCollectionViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -1,5 +1,5 @@
//
// Pattern1ViewController.swift
// IntroViewController.swift
// Example
//
// Created by hiroyuki yoshida on 2016/01/04.
@@ -9,18 +9,20 @@
import UIKit
import InfiniteCollectionView
final class Pattern1ViewController: UIViewController {
final class IntroViewController: UIViewController {
var items = ["1", "2", "3", "4"]
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = UIScreen.mainScreen().bounds.width
collectionView.registerNib(ImageCollectionViewCell.nib, forCellWithReuseIdentifier: ImageCollectionViewCell.identifier)
collectionView.registerNib(IntroCollectionViewCell.nib, forCellWithReuseIdentifier: IntroCollectionViewCell.identifier)
collectionView.pagingEnabled = true
}
}
@IBOutlet weak var layout: UICollectionViewFlowLayout! {
didSet {
layout.scrollDirection = .Horizontal
layout.itemSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: UIScreen.mainScreen().bounds.height)
}
}
@@ -29,19 +31,19 @@ final class Pattern1ViewController: UIViewController {
pageControl.numberOfPages = items.count
}
}
static func createFromStoryboard() -> Pattern1ViewController {
let storyboard = UIStoryboard(name: "Pattern1", bundle: nil)
return storyboard.instantiateInitialViewController() as! Pattern1ViewController
static func createFromStoryboard() -> IntroViewController {
let storyboard = UIStoryboard(name: "Intro", bundle: nil)
return storyboard.instantiateInitialViewController() as! IntroViewController
}
}
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension Pattern1ViewController: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
extension IntroViewController: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return items.count
}
func cellForItemAtIndexPath(collectionView: UICollectionView, dequeueIndexPath: NSIndexPath, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(ImageCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! ImageCollectionViewCell
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(IntroCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! IntroCollectionViewCell
cell.configure(dequeueIndexPath: indexPath)
return cell
}
@@ -1,132 +0,0 @@
//
// Pattern2ViewController.swift
// Example
//
// Created by hiroyuki yoshida on 2016/01/04.
// Copyright © 2016 hiroyuki yoshida. All rights reserved.
//
import UIKit
import InfiniteCollectionView
final class Pattern2ViewController: UIViewController {
static func createFromStoryboard() -> Pattern2ViewController {
let storyboard = UIStoryboard(name: "Pattern2", bundle: nil)
return storyboard.instantiateInitialViewController() as! Pattern2ViewController
}
@IBOutlet weak var tableView: UITableView! {
didSet {
tableView.delegate = self
tableView.dataSource = self
tableView.separatorStyle = .None
}
}
}
// MARK: - UITableViewDataSource, UITableViewDelegate
extension Pattern2ViewController: UITableViewDataSource, UITableViewDelegate {
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 2
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 1
} else if section == 1 {
return 1
}
return 0
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCellWithIdentifier(InfiniteTableViewCell.identifier) as! InfiniteTableViewCell
return cell
} else if indexPath.section == 1 {
let cell = tableView.dequeueReusableCellWithIdentifier(Infinite2TableViewCell.identifier) as! Infinite2TableViewCell
return cell
} else {
return UITableViewCell()
}
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if indexPath.section == 0 {
return 240
} else if indexPath.section == 1 {
return 120
}
return 0
}
}
final class InfiniteTableViewCell: UITableViewCell {
static let identifier = "InfiniteTableViewCell"
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = UIScreen.mainScreen().bounds.width
collectionView.registerNib(ImageCollectionViewCell.nib, forCellWithReuseIdentifier: ImageCollectionViewCell.identifier)
}
}
@IBOutlet weak var layout: UICollectionViewFlowLayout! {
didSet {
layout.itemSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 239)
}
}
@IBOutlet weak var pageControl: UIPageControl! {
didSet {
pageControl.numberOfPages = 4
}
}
}
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension InfiniteTableViewCell: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return 4
}
func cellForItemAtIndexPath(collectionView: UICollectionView, dequeueIndexPath: NSIndexPath, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(ImageCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! ImageCollectionViewCell
cell.configure(dequeueIndexPath: indexPath)
return cell
}
func didSelectCellAtIndexPath(collectionView: UICollectionView, indexPath: NSIndexPath) {
}
func didUpdatePageIndex(index: Int) {
pageControl.currentPage = index
}
}
final class Infinite2TableViewCell: UITableViewCell {
static let identifier = "Infinite2TableViewCell"
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = 100
collectionView.registerNib(ImageCollectionViewCell.nib, forCellWithReuseIdentifier: ImageCollectionViewCell.identifier)
}
}
}
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension Infinite2TableViewCell: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return 10
}
func cellForItemAtIndexPath(collectionView: UICollectionView, dequeueIndexPath: NSIndexPath, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(ImageCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! ImageCollectionViewCell
cell.configure(dequeueIndexPath: indexPath)
return cell
}
}
@@ -5,10 +5,10 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Pattern2 View Controller-->
<!--Secound View Controller-->
<scene sceneID="awT-Vc-4AD">
<objects>
<viewController id="OWH-Uo-QHx" customClass="Pattern2ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="OWH-Uo-QHx" customClass="SecoundViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="cDA-oR-G5q"/>
<viewControllerLayoutGuide type="bottom" id="aif-qL-b6r"/>
@@ -21,24 +21,23 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="InfiniteTableViewCell" rowHeight="161" id="1U1-fg-z8H" customClass="InfiniteTableViewCell" customModule="Example" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SecoundInfiniteTableViewCell" rowHeight="161" id="1U1-fg-z8H" customClass="SecoundInfiniteTableViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="600" height="161"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1U1-fg-z8H" id="FjB-bh-baH">
<rect key="frame" x="0.0" y="0.0" width="600" height="160"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="g4o-O8-u5y" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="g4o-O8-u5y" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="160"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="JvE-3O-3Xs">
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="JvE-3O-3Xs">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ImageCollectionViewCell" id="PWv-9R-TGh" customClass="ImageCollectionViewCell" customModule="Example" customModuleProvider="target">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="IntroCollectionViewCell" id="PWv-9R-TGh" customClass="IntroCollectionViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="160"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -99,45 +98,13 @@
<outlet property="pageControl" destination="TnJ-eK-8qD" id="APk-sp-T8S"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Infinite2TableViewCell" rowHeight="101" id="Pbe-Q2-B3O" customClass="Infinite2TableViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="189" width="600" height="101"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SecoundTableViewCell" rowHeight="44" id="Pbe-Q2-B3O" customClass="SecoundTableViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="189" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Pbe-Q2-B3O" id="Vro-Kf-tWq">
<rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="ba3-za-Kdk" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="100"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="9h8-PU-jeW">
<size key="itemSize" width="100" height="100"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="ImageCollectionViewCell" id="HBK-Vd-0rJ" customClass="ImageCollectionViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</collectionViewCell>
</cells>
</collectionView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="ba3-za-Kdk" secondAttribute="bottom" id="40f-BR-dI0"/>
<constraint firstItem="ba3-za-Kdk" firstAttribute="top" secondItem="Vro-Kf-tWq" secondAttribute="top" id="BVM-Cc-Dkj"/>
<constraint firstAttribute="trailing" secondItem="ba3-za-Kdk" secondAttribute="trailing" id="Kkr-D5-1TC"/>
<constraint firstItem="ba3-za-Kdk" firstAttribute="leading" secondItem="Vro-Kf-tWq" secondAttribute="leading" id="fO3-pr-FzH"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="collectionView" destination="ba3-za-Kdk" id="kOQ-H0-6oO"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
+112
View File
@@ -0,0 +1,112 @@
//
// SecoundViewController.swift
// Example
//
// Created by hiroyuki yoshida on 2016/01/04.
// Copyright © 2016 hiroyuki yoshida. All rights reserved.
//
import UIKit
import InfiniteCollectionView
final class SecoundViewController: UIViewController {
static func createFromStoryboard() -> SecoundViewController {
let storyboard = UIStoryboard(name: "Secound", bundle: nil)
return storyboard.instantiateInitialViewController() as! SecoundViewController
}
@IBOutlet weak var tableView: UITableView! {
didSet {
tableView.delegate = self
tableView.dataSource = self
}
}
}
// MARK: - UITableViewDataSource, UITableViewDelegate
extension SecoundViewController: UITableViewDataSource, UITableViewDelegate {
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 2
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 1
} else {
return 50
}
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCellWithIdentifier(SecoundInfiniteTableViewCell.identifier) as! SecoundInfiniteTableViewCell
return cell
} else {
let cell = tableView.dequeueReusableCellWithIdentifier(SecoundTableViewCell.identifier)
cell?.textLabel?.text = String(indexPath.row)
return cell!
}
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if indexPath.section == 0 {
return 160
} else {
return 50
}
}
}
final class SecoundTableViewCell: UITableViewCell {
static let identifier = "SecoundTableViewCell"
}
final class SecoundInfiniteTableViewCell: UITableViewCell {
static let identifier = "SecoundInfiniteTableViewCell"
var items = ["1", "2", "3", "4"]
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = UIScreen.mainScreen().bounds.width
collectionView.registerNib(IntroCollectionViewCell.nib, forCellWithReuseIdentifier: IntroCollectionViewCell.identifier)
collectionView.pagingEnabled = true
}
}
@IBOutlet weak var layout: UICollectionViewFlowLayout! {
didSet {
layout.scrollDirection = .Horizontal
layout.itemSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 159)
}
}
@IBOutlet weak var pageControl: UIPageControl! {
didSet {
pageControl.numberOfPages = items.count
}
}
}
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension SecoundInfiniteTableViewCell: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return items.count
}
func cellForItemAtIndexPath(collectionView: UICollectionView, dequeueIndexPath: NSIndexPath, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(IntroCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! IntroCollectionViewCell
cell.configure(dequeueIndexPath: indexPath)
return cell
}
func didSelectCellAtIndexPath(collectionView: UICollectionView, indexPath: NSIndexPath) {
}
func didUpdatePageIndex(index: Int) {
pageControl.currentPage = index
}
}
@@ -1,5 +1,5 @@
//
// MainViewController.swift
// ViewController.swift
// Example
//
// Created by hiroyuki yoshida on 2015/10/17.
@@ -9,7 +9,7 @@
import UIKit
import InfiniteCollectionView
final class MainViewController: UIViewController {
final class ViewController: UIViewController {
var patterns = ["pattern1", "pattern2"]
let identifier = "tableViewCell"
@IBOutlet weak var tableView: UITableView! {
@@ -29,7 +29,7 @@ final class MainViewController: UIViewController {
}
}
extension MainViewController: UITableViewDelegate, UITableViewDataSource {
extension ViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return patterns.count
}
@@ -40,10 +40,10 @@ extension MainViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if indexPath.row == 0 {
let controller = Pattern1ViewController.createFromStoryboard()
let controller = IntroViewController.createFromStoryboard()
navigationController?.pushViewController(controller, animated: true)
} else if indexPath.row == 1 {
let controller = Pattern2ViewController.createFromStoryboard()
let controller = SecoundViewController.createFromStoryboard()
navigationController?.pushViewController(controller, animated: true)
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
PODS:
- InfiniteCollectionView (1.0.2)
- InfiniteCollectionView (1.0.0)
DEPENDENCIES:
- InfiniteCollectionView (from `..`)
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ".."
SPEC CHECKSUMS:
InfiniteCollectionView: 98f7a81ea0b519e7f33a64306b7c148c996cb023
InfiniteCollectionView: f1adbd99a90a953ddf504aa75a92e868467f07e2
COCOAPODS: 0.39.0
+24
View File
@@ -0,0 +1,24 @@
{
"name": "Bottomsheet",
"version": "1.0.1",
"summary": "Custom Swift AlertController.",
"homepage": "https://github.com/hryk224/Bottomsheet",
"screenshots": "https://raw.githubusercontent.com/wiki/hryk224/Bottomsheet/images/sample1.gif",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"hyyk224": "hryk224@gmail.com"
},
"platforms": {
"ios": "8.0"
},
"source": {
"git": "https://github.com/hryk224/Bottomsheet.git",
"tag": "1.0.1"
},
"source_files": "Bottomsheet/*.{h,swift}",
"frameworks": "UIKit",
"requires_arc": true
}
@@ -1,7 +1,7 @@
{
"name": "InfiniteCollectionView",
"version": "1.0.2",
"summary": "Infinite Scrolling Using UICollectionView.",
"version": "1.0.0",
"summary": "Component which presents a dismissible view from the bottom of the screen.",
"homepage": "https://github.com/hryk224/InfiniteCollectionView",
"screenshots": "https://github.com/hryk224/InfiniteCollectionView/wiki/images/sample1.gif",
"license": {
@@ -16,7 +16,7 @@
},
"source": {
"git": "https://github.com/hryk224/InfiniteCollectionView.git",
"tag": "1.0.2"
"tag": "1.0.0"
},
"source_files": "InfiniteCollectionView/*.{h,swift}",
"frameworks": "UIKit",
+2 -2
View File
@@ -1,5 +1,5 @@
PODS:
- InfiniteCollectionView (1.0.2)
- InfiniteCollectionView (1.0.0)
DEPENDENCIES:
- InfiniteCollectionView (from `..`)
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ".."
SPEC CHECKSUMS:
InfiniteCollectionView: 98f7a81ea0b519e7f33a64306b7c148c996cb023
InfiniteCollectionView: f1adbd99a90a953ddf504aa75a92e868467f07e2
COCOAPODS: 0.39.0
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "77E44C9D2CAB52270D7B1EAC"
BuildableName = "Bottomsheet.framework"
BlueprintName = "Bottomsheet"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -14,7 +14,7 @@
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = 'primary'
BlueprintIdentifier = 'DF940934065E988D66E7D5F0'
BlueprintIdentifier = 'D09EB6C673F2B45CF7AD4994'
BlueprintName = 'InfiniteCollectionView'
ReferencedContainer = 'container:Pods.xcodeproj'
BuildableName = 'InfiniteCollectionView.framework'>
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "InfiniteCollectionView"
s.version = "1.0.3"
s.version = "1.0.0"
s.summary = "Infinite Scrolling Using UICollectionView."
s.homepage = "https://github.com/hryk224/InfiniteCollectionView"
s.screenshots = "https://github.com/hryk224/InfiniteCollectionView/wiki/images/sample1.gif"
@@ -1,8 +1,8 @@
//
// InfiniteCollectionView.swift
// Bottomsheet.swift
// Pods
//
// Created by hryk224 on 2015/10/17.
// Created by hiroyuki yoshida on 2015/10/17.
//
//
@@ -31,7 +31,7 @@ public class InfiniteCollectionView: UICollectionView {
super.init(coder: aDecoder)
configure()
}
override public init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
super.init(frame: frame, collectionViewLayout: layout)
configure()
}
@@ -40,6 +40,12 @@ public class InfiniteCollectionView: UICollectionView {
// MARK: - private
private extension InfiniteCollectionView {
func configure() {
backgroundColor = UIColor.clearColor()
showsHorizontalScrollIndicator = false
showsVerticalScrollIndicator = false
clipsToBounds = true
scrollEnabled = true
pagingEnabled = true
delegate = self
dataSource = self
registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: Me.defaultIdentifier)
+4 -7
View File
@@ -1,9 +1,6 @@
# InfiniteCollectionView
Infinite horizontal scrolling using `UICollectionView`
[![CocoaPods Compatible](http://img.shields.io/cocoapods/v/InfiniteCollectionView.svg?style=flat)](http://cocoadocs.org/docsets/InfiniteCollectionView)
[![Swift 2.0](https://img.shields.io/badge/Swift-2.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
Infinite Scrolling Using `UICollectionView`
<img src="https://github.com/hryk224/InfiniteCollectionView/wiki/images/sample1.gif" width="320" >
<img src="https://github.com/hryk224/InfiniteCollectionView/wiki/images/sample2.gif" width="320" >
@@ -15,7 +12,7 @@ Infinite horizontal scrolling using `UICollectionView`
## install
#### CocoaPods
#### Cocoapods
Adding the following to your `Podfile` and running `pod install`:
@@ -41,8 +38,8 @@ import InfiniteCollectionView
#### delegate, dataSource
```Swift
collectionView.infiniteDataSource = XXX
collectionView.infiniteDelegate = XXX
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = XXX
```