Animated sharingan loader for iOS projects.
This is a fun project created using SwiftUI with love for the Uchiha clan. More types of eyes to come with tons of customizations...
Feel free to create an issue for suggestions or feature requests.
The mangekyou sharingan is awakened after 4x `animationDuration`.
Sharingasrc="https://raw.github.com/Fury-2K/Sharingan-Loader/main/angekyou Sharingan --- | --- <img style="max-width:100%;" align="right" src="/Rsrc="https://raw.github.com/Fury-2K/Sharingan-Loader/main/ces/img1.png" width="280"> |
The project is built supporting iOsrc="https://raw.github.com/Fury-2K/Sharingan-Loader/main/and above.
First add the project using Swift Package Manager like this -
dependencies: [
.package(url: "https://github.com/Fury-2K/Sharingan-Loader.git", from: "0.1.3")
]
In the codebase you can do the following to use the loader -
import SharinganLoader
SharinganLoader(diameter: 150,
animationDuration: 1,
backgroundDarkness: 0.2,
isVisible: $showingLoader,
shouldTransformToMangekyou: true)
The initializer is like -
SharinganLoader(diameter: CGFloat,
animationDuration: Double,
backgroundDarkness: Double,
isVisible: Binding<Bool>,
shouldTransformToMangekyou: Bool)
This has the following properties to help customize -
/// Diameter of the sharingan eye.
var diameter: CGFloat
/// Time taken for the eye to complete 1 full rotation.
var animationDuration: Double
/// Black background intensity.
/// Range => 0 to 1
var backgroundDarkness: Double
/// Binding var to toggle loader visibility.
@Binding var isVisible: Bool
/// Toggle to allow mangekyou sharingan awakening.
var shouldTransformToMangekyou: Bool
© Manas Aggarwal | 2021
link |
Stars: 16 |
Last commit: 1 year ago |
Added the transformation with a toggle for mangekyou sharingan.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics