s2mr / Elephant
Licence: apache-2.0
Elegant SVG animation kit for swift
Stars: ✭ 107
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Elephant
Livecode Svganimation
In my Smashing Toronto talk, I'll be live coding an SVG animation from start to finish. Here's the repo that houses the base materials, and any further references for things we don't have time to cover.
Stars: ✭ 96 (-10.28%)
Mutual labels: svg
Rxviz
Rx Visualizer - Animated playground for Rx Observables
Stars: ✭ 1,471 (+1274.77%)
Mutual labels: svg
D3 Tube Map
Draw tube maps in the style of the London Underground using d3
Stars: ✭ 106 (-0.93%)
Mutual labels: svg
Processing Svg Experiments
Some Processing example projects to export SVGs
Stars: ✭ 101 (-5.61%)
Mutual labels: svg
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (-1.87%)
Mutual labels: svg
Svg Path Editor
Online editor to create and manipulate SVG paths
Stars: ✭ 1,350 (+1161.68%)
Mutual labels: svg
I7j Pdfhtml
pdfHTML is an iText 7 add-on for Java that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing.
Stars: ✭ 104 (-2.8%)
Mutual labels: svg
Openmoji
Open source emojis for designers, developers and everyone else!
Stars: ✭ 1,380 (+1189.72%)
Mutual labels: svg
Reimg
reimg - A javascript library for converting image formats
Stars: ✭ 106 (-0.93%)
Mutual labels: svg
React Native Responsive Linechart
A customizable and responsive line or area chart for react-native
Stars: ✭ 105 (-1.87%)
Mutual labels: svg
Elephant
This is SVG animation presentation kit for iOS.
Example
You can run example app. Please open Example-iOS/Elephant-iOS.xcworkspace
!
Usage
You can display the svg image with animation.
We are supportted two animation formats😎
The format is below.
- Animation in SVG
- Animation in CSS
Usage is difference by the format.
SVGView initialization
This is initialization SVGView for format 1 (Animation in SVG) usage.
SVGView(named: "svg-filename", animationOwner: .svg)
This is initialization SVGView for format 2 (Animation in CSS) usage.
SVGView(named: "svg-filename", animationOwner: .css, style: .cssFile(name: "css-filename"))
Show in your ViewController
And, you initialized view, you have to do is only add view to parent view, and start animation like below.
class ViewController: UIViewController {
let svgView = SVGView(named: "image", animationOwner: .svg)
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(svgView)
svgView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
svgView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
svgView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
svgView.widthAnchor.constraint(equalToConstant: 400),
svgView.heightAnchor.constraint(equalToConstant: 400),
])
svgView.startAnimation()
// svgView.stopAnimation() // Stop animation.
// svgView.isAnimate { [weak self] (value, error) in
// if let error = error {
// print(error)
// }
// guard let value = value else { return } // value means whether animation is moving.
// }
}
}
Requirements
- Xcode 10.2
- Swift 5.0
Installation
CocoaPods
Add this to Podfile
pod 'Elephant'
$ pod install
Carthage
Carthage
Add this to Cartfile
github "kzumu/Elephant"
$ carthage update --platform ios
Author
License
Elephant is available under the Apache v2. See the LICENSE file for more info.
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].