Coder Social home page Coder Social logo

hryk224 / infinitecollectionview Goto Github PK

View Code? Open in Web Editor NEW
227.0 10.0 43.0 45.03 MB

Infinite horizontal scrolling using UICollectionView.

License: MIT License

Swift 94.47% Ruby 2.93% Objective-C 2.60%
cocoapods swift uicollectionview infinite horizontal

infinitecollectionview's Introduction

InfiniteCollectionView

Infinite horizontal scrolling using UICollectionView

CocoaPods Compatible Swift 3.0

Requirements

  • iOS 8.0+
  • Swift 3.0+
  • ARC

install

CocoaPods

Adding the following to your Podfile and running pod install:

use_frameworks!
pod "InfiniteCollectionView"

import

import InfiniteCollectionView

Usage

initialize

@IBOutlet weak var collectionView: InfiniteCollectionView!

delegate, dataSource

collectionView.infiniteDataSource = XXX
collectionView.infiniteDelegate = XXX
// protocol
func number(ofItems collectionView: UICollectionView) -> Int
func collectionView(_ collectionView: UICollectionView, dequeueForItemAt dequeueIndexPath: IndexPath, cellForItemAt usableIndexPath: IndexPath) -> UICollectionViewCell

// optional
func infiniteCollectionView(_ collectionView: UICollectionView, didSelectItemAt usableIndexPath: IndexPath)
func scrollView(_ scrollView: UIScrollView, pageIndex: Int)

Photos from

License

This project is made available under the MIT license. See LICENSE file for details.

infinitecollectionview's People

Contributors

hryk224 avatar jwardle avatar rafcabezas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

infinitecollectionview's Issues

iOS 8

Why you deprecated iOS 8 in Swift 3 branch?

Why UIScrollViewDelegate not getting called

i need to implement timer so it will scroll it self like featured page in app store, but when i call some delegate like this:

func scrollViewWillBeginDragging(_ scrollView: UIScrollView)
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool)

none of them get called. please fix this... i love this library

Swift 4.2 Update

Can you please update this to Swift 4.2?

There are currently a lot of errors.

Thanks.

Is it possible to make it non-infinite?

Hi, very useful library!

Right now does not support the ability to make it non-infinite, right? So when it reaches the end of the collection, it just stops scrolling.

Thanks!

iOS 11 zero items

Hi!
Extension InfiniteCollectionView crashed in correctedIndex func. It is appear when data source is empty. Only on 5s simulator. Can you fix it?

Autolayout Issue?

When rotating the device,images and page control index are not showing properly.
Any Help?

After Swift 3 migration issue

Sorry if I do not leave many details. Feel free to send me a message.

After migration on 3 Swift next issues occurred:

I couldn't override methods of subclass InfiniteCollectionView and have next text of error:

"overriding non-open instance method outside of its defining module"
I will attach a screenshot.

XCode 8.3.2 (8E2002)
MacOS 10.12.3 (16D32)
InfiniteCollectionView (1.3.1)
SPEC CHECKSUMS:
InfiniteCollectionView: 7f6a02482689c7aa34f87bc555b6daa94cb10f7a
screen shot 2017-05-26 at 3 23 24 pm

I fixed it by adding source code to my project, but it's not the best solution.

Autolayout Issue?

When rotating the device,images and page control index are not showing properly.
Any Help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.