gringoiredm / lnzcollectionlayouts Goto Github PK
View Code? Open in Web Editor NEWA collection of CollectionViewLayout.
License: MIT License
A collection of CollectionViewLayout.
License: MIT License
I have an project like center layout my requriment is current index color is red and other colors are white
How can i achive that?
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.
Hi i am using the caraouselLayout and into the cellforrowat i want to detect if the indexpath is the center cell indexpath
Hey there,
I don't know why but I can't change the cell sizes whenever I use any layout.
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
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
The nil coalescing operators need to be broken up into their own variables.
Are there any plans to support swift5?
I am very happy if you have the plan.
thanks.
Trying to change the cell size but it is not working.
I'm using the sizeforItemat methods but it is not working.
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.
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))
I can see this problem
(I made video for you, may be it helps you to reproduce )
http://recordit.co/gMGP5cnTmt
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 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.
https://dl.dropboxusercontent.com/s/8ocdm3xrcdfqsoo/ScreenRecording.gif?dl=0
Check the link.
Can you solve this problem?
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,
}
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.