Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/KelvinJin/AnimatedCollectionViewLayout
Normally a UICollectionView
has no transition effects when you scroll from one item to another. There are lots of ways to write animations for UICollectionView, but using a UICollectionViewLayout subclass is by far the simplest one. And it doesn't break any of your existing code. You can still use your UICollectionView subclass and you don't need to change your UICollectionViewCell. Just plug and enjoy.
Parallax | ZoomInOut | RotateInOut | Cards |
---|---|---|---|
CrossFade | Cube | Page | |
To run the example project, clone the repo, and start iOS Example
in Xcode.
To integrate AnimatedCollectionViewLayout into your Xcode project using CocoaPods, specify it in your Podfile
:
For Swift 4.2 or above:
pod 'AnimatedCollectionViewLayout'
For Swift 4.1 or below:
pod 'AnimatedCollectionViewLayout', '~> 0.3.0'
Carthage and Swift Package Manager are also supported.
Import the library where you want to use it. Create a AnimatedCollectionViewLayout
object, set its animator
and assign it to your UICollectionView
.
import AnimatedCollectionViewLayout
// ...
let layout = AnimatedCollectionViewLayout()
layout.animator = ParallaxAttributesAnimator()
collectionView.collectionViewLayout = layout
Most of the built-in animators work best in Paging mode and they have additional parameters that you can tweak for better transitions.
You can also write your own animators by implementing the protocol LayoutAttributesAnimator
.
AnimatedCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.