All Projects → ivanvorobei → SPPerspective

ivanvorobei / SPPerspective

Licence: MIT License
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to SPPerspective

Spperspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration.
Stars: ✭ 127 (-53.14%)
Mutual labels:  widget, widgets
Graphics32 RBC
Graphics Extension that extend of Graphics32 Library for Delphi XE6 and up (and maybe Lazarus) by Uğur PARLAYAN
Stars: ✭ 32 (-88.19%)
Mutual labels:  widget, widgets
Touch Bar Istats
Show CPU/GPU/MEM temperature on Touch Bar with BetterTouchTool!
Stars: ✭ 141 (-47.97%)
Mutual labels:  widget, widgets
Iced
A cross-platform GUI library for Rust, inspired by Elm
Stars: ✭ 12,176 (+4392.99%)
Mutual labels:  widget, widgets
widgets
🚀 Dojo - UI widgets.
Stars: ✭ 82 (-69.74%)
Mutual labels:  widget, widgets
Evntouchiddemo
🆔 iOS fingerprint login process implementation
Stars: ✭ 98 (-63.84%)
Mutual labels:  widget, widgets
AndroidUiKit
uikit widget common baseview Adapter faster develop
Stars: ✭ 48 (-82.29%)
Mutual labels:  widget, uikit
Nbaseuikit
个人平时使用的一些Qt编写的组件(有部分是整合的开源作品,部分是自己原创);
Stars: ✭ 286 (+5.54%)
Mutual labels:  widget, uikit
scriptable-widgets
A small collection of my Scriptable iOS widgets.
Stars: ✭ 35 (-87.08%)
Mutual labels:  widget, ios14
responsible-ai-toolbox
This project provides responsible AI user interfaces for Fairlearn, interpret-community, and Error Analysis, as well as foundational building blocks that they rely on.
Stars: ✭ 615 (+126.94%)
Mutual labels:  widget, widgets
Toothyprogress
A polyline determinated ProgressBar written in Kotlin
Stars: ✭ 56 (-79.34%)
Mutual labels:  widget, widgets
iOS14-Resources
A curated collection of iOS 14 projects ranging from SwiftUI to ML, AR etc.
Stars: ✭ 85 (-68.63%)
Mutual labels:  uikit, ios14
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+223.62%)
Mutual labels:  widget, uikit
Responsible Ai Widgets
This project provides responsible AI user interfaces for Fairlearn, interpret-community, and Error Analysis, as well as foundational building blocks that they rely on.
Stars: ✭ 107 (-60.52%)
Mutual labels:  widget, widgets
Styled widget
Simplifying widget style in Flutter.
Stars: ✭ 424 (+56.46%)
Mutual labels:  widget, widgets
Ios Widgets
Collection of iOS Widgets
Stars: ✭ 219 (-19.19%)
Mutual labels:  widget, widgets
Shadowview
An iOS Library that makes shadows management easy on UIView.
Stars: ✭ 391 (+44.28%)
Mutual labels:  uikit, shadow
develop
A simple tool to help elementary OS developers to develop their own apps and widgets.
Stars: ✭ 38 (-85.98%)
Mutual labels:  widget, widgets
DiscoverRandomQuotes
Spontaneous - Random quotes is a free iOS app that generates random quotes. It values ease-of-use just as much as the users' privacy, so there are no ads or trackers to disrupt their experience. The app currently includes more than 75000 quotes, which you can only discover randomly.
Stars: ✭ 34 (-87.45%)
Mutual labels:  widget, ios14
cumulocity-app-builder
The Application Builder for Cumulocity provides a simple, coding-free way to create new applications inside Cumulocity. Application Builder is an open-source tool for you to create web applications in a no-code environment. Created by Global Presales.
Stars: ✭ 18 (-93.36%)
Mutual labels:  widget, widgets

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:

https://opensource.ivanvorobei.by/spperspective/preview

If you like the project, don't forget to put star ★
Check out my other libraries:

Navigate

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 automating the distribution of Swift code and is integrated into the swift compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/ivanvorobei/SPPerspective.git", .upToNextMajor(from: "1.4.1"))
]

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.

https://opensource.ivanvorobei.by/spperspective/preview

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.

С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:

Tutorials on YouTube

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].