Giter Site home page Giter Site logo

lnzcollectionlayouts's People

Contributors

assaulter avatar gringoiredm avatar mrgradyed avatar rwbutler 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  avatar  avatar  avatar  avatar  avatar  avatar

lnzcollectionlayouts's Issues

LNZSnapToCenterCollectionViewLayout .scrollDirection = .vertical

any chance you this LNZSnapToCenterCollectionViewLayout could support vertical alignments?

"This collection view layout is an horizontal layout that will allow pagination for items smaller than collection." I'm looking to achieve the same effect as facebook theatre mode / where you can watch tonnes of movies.

Controls Cell size

Hey there,
I don't know why but I can't change the cell sizes whenever I use any layout.

LNZInfiniteCollectionViewLayout crash

Library is crashing the app on layout update: https://www.fabric.io/s5a/ios/apps/com.saksfifthavenue.iphone/issues/599e7c19be077a4dcc8870e7?time=last-seven-days

My guess is that this problem happens when for some reason itemCount is set to 0 when prepare() is called, so that cycleSize.width is set to 0. Or itemSize.width + interitemSpacing is 0.
let width = (itemSize.width + interitemSpacing) * CGFloat(itemCount ?? 0)
Later on when override internal func items(in rect: CGRect) -> [(index:IndexPath, frame: CGRect)] is called and itemCount is greater than 0, which is checked at the start of the method, cycleSize.width remains set to 0 and crash happens let iFirstCycle = Int(floor((rect.origin.x - cycleStart) / cycleSize.width)).

Fix is in the following PR:
#2

Swift 5 Support

Are there any plans to support swift5?
I am very happy if you have the plan.

thanks.

Tagging a new minor release to support Carthage

Now that #28 has been merged (thanks for merging by the way ๐Ÿ™๐Ÿป) I wanted to raise an issue to tag a minor point release just so that there's a release including this change.

When you add an entry e.g.

github gringoireDM/LNZCollectionLayouts

to a Cartfile, Carthage pulls the latest tag for the repo and builds using the shared scheme in the project. This means there needs to be a tagged release including the shared scheme.

If it would be possible to tag a minor release including this change that would be fantastic - thanks in advance.

'final3dTransform' is inaccessible due to 'private' protection level

When I integrated your library at my project I faced with this Error

xxx/LNZSafariTabLayout.swift:387:25: 'final3dTransform' is inaccessible due to 'private' protection level

I think, this problem cause by (private)
private func final3dTransform(forItemOrigin attributesOrigin: CGPoint, andSize attributesSize: CGSize, enforcingAngle angle: CGFloat? = nil) -> CATransform3D

May be it has to be fileprivate?

(because, You use function final3dTransform at extension(at the and of file))

Expression too complex

XCode 9.3 fails building this pod with following error

LNZCollectionLayouts/LNZCollectionLayouts/Layouts/LNZSnapToCenterCollectionViewLayout.swift:148:94: error: expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions
let h = (headerHeight ?? 0) + sectionInsetTop + sectionInsetBottom + itemSize.height + (footerHeight ?? 0)

I want your layout in objective c please help me?

I have working on app that so many customization layout.I like LNZSnapToCenterCollectionViewLayout.swift layout. I want your layout in objective c.I am trying to convert your layout in objective c but some issues facing. so please give me layout of LNZSnapToCenterCollectionViewLayout.swift.

please help me.

How center to left scale, and make item between equals space?

Simulator Screen Shot - iPhone 8 - 2019-07-13 at 11 03 58

private func configureAttributes(for attributes: UICollectionViewLayoutAttributes) {
    guard let collection = collectionView else { return }
    var visibleRect = CGRect()
    visibleRect.origin = collection.contentOffset
    visibleRect.size = collection.bounds.size
    let collectionLeft =  itemSize.width / 2
    let offset = collection.contentOffset.x
    let normalizedLeft =  attributes.center.x  - offset

    let maxDistance =  self.itemSize.width
    let distance = min(abs(collectionLeft - normalizedLeft), maxDistance)
    let ratio = (maxDistance - distance)/maxDistance
    let scale = ratio * (1 - sideItemScale) + sideItemScale

    var t = CATransform3DIdentity
    t = CATransform3DScale(t,  scale, scale, 1.0)
    attributes.zIndex = Int(scale * 10)
    attributes.transform3D = t
    //  change item space,  

}

moveItem(at: to:)

Hi, thanks for good code

I have a question about UICollectionView function "moveItem(at: to:)"

When i use it with your LNZCarouselCollectionViewLayout it looks bad, can u do something with it?

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.