roberthein / bouncylayout Goto Github PK
View Code? Open in Web Editor NEWMake. It. Bounce.
License: MIT License
Make. It. Bounce.
License: MIT License
It continuously animating with circular motion.(In iPhone X)
When return cell size (in layout delegate method) 'CGSize(width: collectionView.frame.width, height: 40)' or
'CGSize(width: collectionView.frame.width - "anyEvenNumber", height: 40)
But it work for CGSize(width: collectionView.frame.width - "anyOddNumber", height: 40)
when the method insertItemsAtIndexPaths:
is executed,the program crashes and prints the log:
no UICollectionViewLayoutAttributes instance for -layoutAttributesForItemAtIndexPath:
Hi @roberthein,
I really love BouncyLayout and have used it for a few of my collection views so far which has worked well. However, I have three UITableViews which should stay tableviews due to some autoresizing issues with UICollectionView even a colleague of mine who is quite experienced at coding was not able to solve. Therefore, I was wondering whether there was a way to use this library on a tableview as I couldn't figure one out.
Would really appreciate your help!
blurtime
I'm using BouncyLayout horizontally, and find that the spacing between each cell compresses far too much, causing an overlap.
Is there a way to avoid compression altogether and have the cells kind of bump of against each other?
This is my podfile look like
use_frameworks!
pod 'BouncyLayout'
when i install my pod it throws error like:
Analyzing dependencies
[!] Unable to find a specification for `BouncyLayout`
I'm trying to install through pod, it show following error in terminal:
Unable to find a specification for BouncyLayout
Is it possible to use it with Objective C project ?
is there a way to convert it or use it by objective-c?
Most old project have iOS 8 minimum and no specific reason to change it. Is there any reason for this lib to be on minimum iOS 9 ?
Storyboard Support ?
I really like this lib, and I want to use it in my chat app. But it is a macOS app, so I want to know, are there any plans on supporting macOS in the future?
There are so many things that don't work with this library.
The list goes on.
@roberthein Can this work with a tableview and if so, can you show me how I could implement it.
Hi, thanks for a great and very simple to implement feature. I have only one issue - I wish the have sections yet the section headers are not being respected.
With the following line implemented:
self.collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
The CollectionView does not show my custom header view for each section.
Without that line, the header is displayed fine.
Any thoughts or suggestions? Kind regards
Is This compatible with JSQ . I know JSQ is Deprecated. but i dont want to convert my whole project . how can i use this with JSQ
@roberthein
Hey how can I use this with IGListCollectionViewLayout?
Would appreciate some pointers.
I tried subclassing but i get errors
Carthage support is missing
I have a view that has rotated cells, simulating cards played out. the cells are rotated randomly:
if rotateCells {
let randomInt = Int.random(in: -17..<18)
cell.rotate(degrees: CGFloat(randomInt))
}
When adding BouncyLayout - the cells don't maintain their rotation. I believe this is a bug...
Support for Swift Package manager
See ApplikeySolutions/VegaScroll#6 for more details
This pod looks great, super clean. I'm having an issue with a flipped collectionview and cell (chat app) though and not sure why.
I've tried both:
let layout = BouncyLayout()
collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
collectionView!.transform = CGAffineTransform.init(rotationAngle: (-(CGFloat)(Double.pi)))
// ...
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
// ...
cell.transform = CGAffineTransform(rotationAngle: CGFloat.pi)
return cell
}
and
let layout = BouncyLayout()
collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
collectionView!.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: 0)
// ...
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
// ...
cell.transform = collectionView.transform
return cell
}
Both create different results. Any ideas? Thanks!
Hi, nice layout !
I have an issue with the example on my iPhone SE and the grid exemple. In random scroll position cell start to make small circle animations on themselves often by group.
PS : I don't know how to provide you a gif of it I'd be glad to learn :) so you'll get a video
bugPhotoCell.mov.zip
The demo works great on simulators and 2x scale devices but it looks strange on 3x devices. Any idea how to fix this?
Is it possible to subclass BouncyLayout? I have some custom behaviours I'd like to mix with BouncyLayout.
Hi there, good job on this project, it looks really cool and I am looking forward to using it.
I tried to use it with my collection view in which I’m using self-sizing cells, simply droppping in BouncyLayout()
in place of the existing UICollectionViewFlowLayout()
, and setting a random .estimatedItemSize
before assigning it to the collection view. The self-sizing behaviour doesn’t remain, however, and the cells all get resized to a fixed size.
My project is currently in a haphazard state so I can’t upload the code; however I’m using IGListKit and was able to reproduce this effect with their provided self-sizing cells example.
Do you plan on adding support for self-sizing cells to BouncyLayout? The Instagram people themselves had a bunch of issues with implementing it, so I would understand if you don’t plan on doing so; their codebase would be a great help if you did, however.
Thanks!
There's a 1px left-right-jitter glitch happening on the moved items when the animation settles down. They are already at their destination, but glitching a bit to the left and to the right until they finally stop. I'm pretty sure this is happening, because the spring is still oscillating, but the values become too small to render (< 1px) causing it to look like a bug.
You can actually see that behavior in the demo gif in the README
.
Any ideas how this could be fixed? I was thinking of a custom Dynamic Item or Behavior, but perhaps there's a simpler approach. Help is greatly appreciated!
Your lib is so cool :))
I'm making a chat app and i dont know how to make cell message auto dimension (like tableview) with bouncy. Does you lib support or how i can archive that?
Thank you!
If the framework can support is not equal to the height of the UICollectionViewCell and the cell containing the head trying to will be better ~ I have some problems with your framework~
it works good when collectionView has no header or footer.
but will missing cell or some other display trouble when I added it a header or footer in each section.
wish you answer! thanks.
I'd like to do some initial display animations through override func initialLayoutAttributesForAppearingItem
but can't subclass when importing as an external framework (Carthage)
Hi,
an enhancement will be the ability to modify the damping and the frequency property of the animator. What do you think about it?
Matteo
I saved the heights of cells in data models and its working perfectly. When inserting a new cell, heights of visible cells are changed to next model. Again when the cells are scrolled out of view, and reenter then the are updated correctly. However default UICollectionViewFlowLayout has no issues.
If you have constantly rotating cells bug, make sure you are floor() all CGFloat values that you have pass in FlowLayoutDelegate methods.
Hi! Great library :)
Not sure if this is iPad specific, but when the UITraitCollection is changed (e.g. display is rotated, OR if you adjust the size of the app in SplitView to name a couple of ways), it throws off the UICollectionView and requires you to scroll down and then back up to have it reload those rows.
Any advice would be appreciated! 😄
I'm using like this:
self.collectionView.collectionViewLayout = BouncyLayout()
Please help me if I'm wrong somewhere.
Thanks!
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.