Giter Site home page Giter Site logo

thorntechpublic / horizontalscrollingcollectionview Goto Github PK

View Code? Open in Web Editor NEW
102.0 102.0 36.0 24.27 MB

Independently scroll rows by newsting UICollectionView inside UITableView

Home Page: http://www.thorntech.com/2015/08/want-your-swift-app-to-scroll-in-two-directions-like-netflix-heres-how/

Swift 100.00%

horizontalscrollingcollectionview's People

Contributors

chenr2 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

horizontalscrollingcollectionview's Issues

Bug : scrolling the Collection ad row x also scroll the collections at row x+ny with n = 1,2,3...

Hi,
thanks for sharing this tutorial, very useful.
Unfortunatelly I think I found a bug.
To see what I mean, please extend the number of section to
var categories = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11","12", "13", "14", "15", "16", "17" ]

and add different color per collection cell (in CategoryRow.swift)

func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCellWithReuseIdentifier("videoCell", forIndexPath: indexPath) as! VideoCell
        if (indexPath.row == 0) {cell.backgroundColor = UIColor.greenColor()}
        if (indexPath.row == 1) {cell.backgroundColor = UIColor.redColor()}
        if (indexPath.row == 2) {cell.backgroundColor = UIColor.blueColor()}
        if (indexPath.row == 3) {cell.backgroundColor = UIColor.purpleColor()}
        if (indexPath.row == 4) {cell.backgroundColor = UIColor.yellowColor()}
        if (indexPath.row == 5) {cell.backgroundColor = UIColor.grayColor()}
        if (indexPath.row == 6) {cell.backgroundColor = UIColor.cyanColor()}
        if (indexPath.row == 7) {cell.backgroundColor = UIColor.clearColor()}
        if (indexPath.row == 8) {cell.backgroundColor = UIColor.blackColor()}
        if (indexPath.row == 9) {cell.backgroundColor = UIColor.brownColor()}
        if (indexPath.row == 10) {cell.backgroundColor = UIColor.darkGrayColor()}
        if (indexPath.row == 11) {cell.backgroundColor = UIColor.orangeColor()}

        return cell
    }

If you scroll row 1, also the row 7 and 13 are scrolled by the same quantity.
If you scroll row 2, also the row 7 and 14 are scrolled.

IMO is something related to the heigh of the display, n x 1.8 x display height the scroll is repeated.

I hope this can help.
Thx,
Michele

Swift 3 version of Melvin branch?

Would be awesome if there is a swift 3 version of the Melvin branch. Am trying now to do the conversion and will do a pull request if succesful

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.