Giter Site home page Giter Site logo

Comments (8)

ParsifalC avatar ParsifalC commented on May 27, 2024 1

Alright.
1.invisibleCellCount 2.attributes.center 3.contentSize
Here's the core codes.

        if configuration.wheelType == .bottomCenter || configuration.wheelType == .topCenter {
            invisibleCellCount = Double(collectionView.contentOffset.x/configuration.cellSize.width)
        } else {
            invisibleCellCount = Double(collectionView.contentOffset.y/configuration.cellSize.height)
        }
        case .topCenter:
            attributes.center = CGPoint(x: contentOffset.x+(viewSize.width)/2.0, y: (contentOffset.y)+cellSize.height/2)
  
        case .bottomCenter,.topCenter:
            visibleCellCount = CGFloat(180.0/configuration.angular+1.0)
            contentSize = CGSize(width: (viewSize.width)+(CGFloat(cellCount)-visibleCellCount)*(configuration.cellSize.width)+CGFloat(configuration.contentHeigthPadding), height:viewSize.height)

from cpcollectionviewwheellayoutswift.

ParsifalC avatar ParsifalC commented on May 27, 2024 1

It was a vertical layout before.But it's horizontal now.

from cpcollectionviewwheellayoutswift.

ParsifalC avatar ParsifalC commented on May 27, 2024

@mukyasa Thanks for your comments.I'll be glad to do it.The the layout direction is vertical now.You want it horizontal?Right?

from cpcollectionviewwheellayoutswift.

mukyasa avatar mukyasa commented on May 27, 2024

I think so it already horizontal, but the scroll direction is reversed, means if i swipe left the collectionview scrolls to right and vice versa.

from cpcollectionviewwheellayoutswift.

ParsifalC avatar ParsifalC commented on May 27, 2024

Yeah.I got it.I will fix it in 20 minutes.

from cpcollectionviewwheellayoutswift.

ParsifalC avatar ParsifalC commented on May 27, 2024

@mukyasa YO!Checkout this repo.I think it's ok now.

from cpcollectionviewwheellayoutswift.

ParsifalC avatar ParsifalC commented on May 27, 2024

😄Don't forget to star it if you like.

from cpcollectionviewwheellayoutswift.

mukyasa avatar mukyasa commented on May 27, 2024

Sure Bro, Thanks for quick response ,

from cpcollectionviewwheellayoutswift.

Related Issues (1)

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.