10 Commits

Author SHA1 Message Date
hyyk224 6a48f737a5 Small changed 2016-01-04 23:55:41 +09:00
hyyk224 3507a4c111 Small change 2016-01-04 23:50:06 +09:00
hyyk224 8a0f484005 Small change 2016-01-04 23:49:05 +09:00
hryk224 d53ce82709 Update InfiniteCollectionView.swift 2016-01-04 13:03:51 +09:00
hryk224 becf48a371 Update README.md 2016-01-04 12:52:20 +09:00
hryk224 3ef6dc341f Update README.md 2016-01-04 12:51:57 +09:00
hryk224 d5c55b9fad Deleted unusing scheme 2016-01-04 11:09:03 +09:00
hryk224 fe89d67619 Update README.md 2016-01-04 11:01:51 +09:00
hryk224 7bf1067950 Update README.md 2016-01-04 10:56:46 +09:00
hryk224 0965067d6b Update README.md 2016-01-04 10:56:19 +09:00
19 changed files with 241 additions and 100 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 MiB

@@ -0,0 +1,21 @@
{
"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.

After

Width:  |  Height:  |  Size: 14 MiB

@@ -0,0 +1,21 @@
{
"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.

After

Width:  |  Height:  |  Size: 1.3 MiB

@@ -0,0 +1,21 @@
{
"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.

After

Width:  |  Height:  |  Size: 4.5 MiB

@@ -0,0 +1,21 @@
{
"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.

After

Width:  |  Height:  |  Size: 712 KiB

@@ -0,0 +1,21 @@
{
"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.

After

Width:  |  Height:  |  Size: 8.9 MiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "9.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
+42 -2
View File
@@ -98,10 +98,50 @@
<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="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"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SecoundInfinite2TableViewCell" rowHeight="100" id="Pbe-Q2-B3O" customClass="SecoundInfinite2TableViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="189" width="600" height="100"/>
<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="99"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="ba3-za-Kdk" customClass="InfiniteCollectionView" customModule="InfiniteCollectionView">
<rect key="frame" x="0.0" y="0.0" width="600" height="99"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="9h8-PU-jeW">
<size key="itemSize" width="600" height="99"/>
<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="IntroCollectionViewCell" id="HBK-Vd-0rJ" customClass="IntroCollectionViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="99"/>
<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="600" height="99"/>
<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"/>
<outlet property="layout" destination="9h8-PU-jeW" id="FMS-Ao-3Ra"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SecoundTableViewCell" rowHeight="44" id="MB1-L7-gRN" customClass="SecoundTableViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="289" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="MB1-L7-gRN" id="6hj-FW-qLp">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
+44 -9
View File
@@ -33,14 +33,18 @@ extension SecoundViewController: UITableViewDataSource, UITableViewDelegate {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 1
} else {
return 50
} else if section == 1 {
return 1
}
return 0
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell = tableView.dequeueReusableCellWithIdentifier(SecoundInfiniteTableViewCell.identifier) as! SecoundInfiniteTableViewCell
return cell
} else if indexPath.section == 1 {
let cell = tableView.dequeueReusableCellWithIdentifier(SecoundInfinite2TableViewCell.identifier) as! SecoundInfinite2TableViewCell
return cell
} else {
let cell = tableView.dequeueReusableCellWithIdentifier(SecoundTableViewCell.identifier)
cell?.textLabel?.text = String(indexPath.row)
@@ -49,10 +53,11 @@ extension SecoundViewController: UITableViewDataSource, UITableViewDelegate {
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if indexPath.section == 0 {
return 160
} else {
return 50
return 240
} else if indexPath.section == 1 {
return 120
}
return 0
}
}
@@ -62,7 +67,6 @@ final class SecoundTableViewCell: UITableViewCell {
final class SecoundInfiniteTableViewCell: UITableViewCell {
static let identifier = "SecoundInfiniteTableViewCell"
var items = ["1", "2", "3", "4"]
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
@@ -75,12 +79,12 @@ final class SecoundInfiniteTableViewCell: UITableViewCell {
@IBOutlet weak var layout: UICollectionViewFlowLayout! {
didSet {
layout.scrollDirection = .Horizontal
layout.itemSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 159)
layout.itemSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 239)
}
}
@IBOutlet weak var pageControl: UIPageControl! {
didSet {
pageControl.numberOfPages = items.count
pageControl.numberOfPages = 4
}
}
}
@@ -88,7 +92,7 @@ final class SecoundInfiniteTableViewCell: UITableViewCell {
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension SecoundInfiniteTableViewCell: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return items.count
return 4
}
func cellForItemAtIndexPath(collectionView: UICollectionView, dequeueIndexPath: NSIndexPath, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(IntroCollectionViewCell.identifier, forIndexPath: dequeueIndexPath) as! IntroCollectionViewCell
@@ -102,6 +106,37 @@ extension SecoundInfiniteTableViewCell: InfiniteCollectionViewDataSource, Infini
}
}
final class SecoundInfinite2TableViewCell: UITableViewCell {
static let identifier = "SecoundInfinite2TableViewCell"
@IBOutlet weak var collectionView: InfiniteCollectionView! {
didSet {
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.cellWidth = 100
collectionView.registerNib(IntroCollectionViewCell.nib, forCellWithReuseIdentifier: IntroCollectionViewCell.identifier)
}
}
@IBOutlet weak var layout: UICollectionViewFlowLayout! {
didSet {
layout.scrollDirection = .Horizontal
layout.minimumInteritemSpacing = 0
layout.minimumLineSpacing = 10
layout.itemSize = CGSize(width: 100, height: 100)
}
}
}
// MARK: - InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate
extension SecoundInfinite2TableViewCell: InfiniteCollectionViewDataSource, InfiniteCollectionViewDelegate {
func numberOfItems(collectionView: UICollectionView) -> Int {
return 10
}
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
}
}
@@ -1,62 +0,0 @@
<?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>
@@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "InfiniteCollectionView"
s.version = "1.0.0"
s.version = "1.0.1"
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 @@
//
// Bottomsheet.swift
// InfiniteCollectionView.swift
// Pods
//
// Created by hiroyuki yoshida on 2015/10/17.
// Created by hryk224 on 2015/10/17.
//
//
@@ -45,7 +45,6 @@ private extension InfiniteCollectionView {
showsVerticalScrollIndicator = false
clipsToBounds = true
scrollEnabled = true
pagingEnabled = true
delegate = self
dataSource = self
registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier: Me.defaultIdentifier)
+6 -3
View File
@@ -1,6 +1,9 @@
# InfiniteCollectionView
Infinite Scrolling Using `UICollectionView`
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/)
<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" >
@@ -38,8 +41,8 @@ import InfiniteCollectionView
#### delegate, dataSource
```Swift
collectionView.infiniteDataSource = self
collectionView.infiniteDelegate = self
collectionView.infiniteDataSource = XXX
collectionView.infiniteDelegate = XXX
collectionView.cellWidth = XXX
```