SPPerspective alternatives and similar libraries
Based on the "Animation" category.
Alternatively, view SPPerspective alternatives based on common mentions on social networks and blogs.
-
AnimatedCollectionViewLayout
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code. -
AlertTransition
AlertTransition is a extensible library for making view controller transitions, especially for alert transitions. -
ContainerController
👉↕️📱ContainerController 🧩✨⚙️ is a UI Component Swipe-Panel (Customizable). 💡 The idea is copied from the app: Apple Maps, Stocks. Swift version -
AKVideoImageView
UIImageView subclass that allows you to display a looped video and dynamically switch it. -
Wobbly
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing. -
Disintegrate
Disintegration animation inspired by THAT thing Thanos did at the end of Avengers: Infinity War. -
VariousViewsEffects
Various view's effects for iOS, written in Swift. Allows you to animate views nicely with easy to use extensions. Currently supported animations: Glass Break, Explode, Snowflakes. Every animation is randomized.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SPPerspective or a related project?
README
SPPerspective
About
Animatable widgets from iOS 14. Same animation for transform and shadow.
Customisable duration, perspective and shadow also. For visual edit use example app, check video preview:
If you like the project, don't forget to put star ★
Check out my other libraries:
Navigate
- Installation
- Quick Start
- Customise
- [Сontribution](#сontribution)
- Other Projects
- Russian Community
Installation
Ready for use on iOS 12+. Works with Swift 5+. Required Xcode 12.0 and higher.
Swift Package Manager
The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
To integrate using Xcode 12, specify it in File > Swift Packages > Add Package Dependency...
:
https://github.com/ivanvorobei/SPPerspective
CocoaPods:
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your Podfile
:
pod 'SPPerspective'
Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/SPPerspective
folder in your Xcode project. Make sure to enable Copy items if needed
and Create groups
.
Quick Start
For apply animation for your view, use this code:
view.applyPerspective(.iOS14WidgetAnimatable)
Use this, if need apply non-animation transform:
view.applyPerspective(.iOS14WidgetStatic)
Customise
Summary
You can customise duration, angle, shadow properties and other. All this customising by configuration file. Configuration can be animatable or static. Above you see .iOS14WidgetAnimatable
& .iOS14WidgetStatic
, its also configurations wich already have good-usage values same as native widgets.
For get fine configuration, better use example app (video preview). You can in real time see changes in configuration.
Next more details about customise.
Duration
When you init new animation configuration, you can set duration:
let animationConfig = SPPerspectiveAnimationConfig(duration: 16, distortion: 600, angle: 10, vectorStep: 3.14, shadow: nil)
view.applyPerspective(animationConfig)
If need change duration for default config, using this:
let animationConfig = SPPerspectiveConfig.iOS14WidgetAnimatable
animationConfig.animationDuration = 8
view.applyPerspective(animationConfig)
Perspective
Angle is how much the view will rotate. For change it call angle
in config:
animationConfig.angle = 10
Also you can customise distortion of perspective. Using this:
animationConfig.distortionPerspective = 600
Both properties allow you configure transform for your view. If you don't know which values shoud using, check use example app (video preview). With sliders you can customize it in detail.
Shadow
Shadow also using configuration. Static and animation configs contains shadow property.
Blur, Opacity & Color
It simple. For change blur, opacity and color call this in configuration.
animationConfig.shadowConfig?.blurRadius = 5
animationConfig.shadowConfig?.opacity = 0.3
animationConfig.shadowConfig?.color = .black
Translations
Translation help customise position of shadow for any state of transform. For example you can want do more vertical translation for show deep transform.
Transform adaptive for each higlight corner. For example startVerticalOffset
using when highlight top-center side. For bottom corners available cornerVerticalOffset
. For bottom-center side shoud change maximumVerticalOffset
. Horizontal trnalation customising by maximumHorizontalOffset
.
animationConfig.shadowConfig?.startVerticalOffset = 8
animationConfig.shadowConfig?.cornerVerticalOffset = 18
animationConfig.shadowConfig?.maximumVerticalOffset = 21
animationConfig.shadowConfig?.maximumHorizontalOffset = 12
For get fine result, you shoud use this rule: startVerticalOffset
< cornerVerticalOffset
< maximumVerticalOffset
. Visual transform available in example app (video preview), with it you get fine values.
Other Projects
I love being helpful. Here I have provided a list of libraries that I keep up to date. For see video previews
of libraries without install open opensource.ivanvorobei.by website.
I have libraries with native interface and managing permissions. Also available pack of useful extensions for boost your development process.
Сontribution
My English is very bad. You can see this once you read the documentation. I would really like to have clean and nice documentation. If you see gramatical errors and can help fix the Readme, please contact me [email protected] or make a Pull Request. Thank you in advance!
Other Projects
I love being helpful. Here I have provided a list of libraries that I keep up to date. For see video previews
of libraries without install open opensource.ivanvorobei.by website.
I have libraries with native interface and managing permissions. Also available pack of useful extensions for boost your development process.
Russian Community
Подписывайся в телеграмм-канал, если хочешь получать уведомления о новых туториалах. Со сложными и непонятными задачами помогут в чате.
Видео-туториалы выклыдываю на YouTube: