All Projects → lotus-ios → lotus

lotus-ios / lotus

Licence: MIT license
A Swift animation DSL for animating layers with help of CoreAnimation

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to lotus

Iosproject
iOS project of collected some demos for iOS App, use Objective-C
Stars: ✭ 5,357 (+35613.33%)
Mutual labels:  coreanimation
Facebookpoptest
动画实现的一些常见功能及实现方式,不断更新中....
Stars: ✭ 99 (+560%)
Mutual labels:  coreanimation
Core Animation Fun House
Core Animation Examples (Basics, Replicator, Reflection, Wiggle Jiggle, Lissajous Curve, Sine Wave, etc.)
Stars: ✭ 249 (+1560%)
Mutual labels:  coreanimation
Vktableview
Hi! I was working on an app where I had to show information about 10-12 different entities and each entity details are to be shown in a UICollectionView. Thought of adding some fancy element and I came up with this project. Would love your feedback. Please have a look at GIF attached to have a better idea of what I have come up with. Swift4.
Stars: ✭ 30 (+100%)
Mutual labels:  coreanimation
Learniosanimations
Learn iOS Animations
Stars: ✭ 66 (+340%)
Mutual labels:  coreanimation
Imagineengine
A project to create a blazingly fast Swift game engine that is a joy to use 🚀
Stars: ✭ 1,751 (+11573.33%)
Mutual labels:  coreanimation
Pinterestsegment
A Pinterest-like segment control with masking animation.
Stars: ✭ 560 (+3633.33%)
Mutual labels:  coreanimation
UberAnimation
Heyaa! This is an attempt to mimic the animation Uber and Facebook shows up as a Congratulatory Pop-up. Looking at the attached GIF will give you a better idea of what this project covers. All written in Swift4.
Stars: ✭ 58 (+286.67%)
Mutual labels:  coreanimation
Tkrubberindicator
A rubber animation pagecontrol
Stars: ✭ 1,337 (+8813.33%)
Mutual labels:  coreanimation
Axanimationchain
AXAnimationChain is a chain animation library, can be used to easily create CAAnimation based chain animation. There are two kinds of combination chain, one is called combination, the other is called link, created by the two ways above, the animation can be carried out at the same time, can also according to the time order, you can use the code to create a rich and complex animation.
Stars: ✭ 234 (+1460%)
Mutual labels:  coreanimation
Mystique
A wrapper for CoreAnimation.
Stars: ✭ 43 (+186.67%)
Mutual labels:  coreanimation
Progressbutton
Custom ProgressButton
Stars: ✭ 52 (+246.67%)
Mutual labels:  coreanimation
Animatedgraph
Animated Graph which you can include in your application to show information in more attractive way
Stars: ✭ 162 (+980%)
Mutual labels:  coreanimation
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+5746.67%)
Mutual labels:  coreanimation
Dwanimatedlabel
An UILabel subclass that lets you animate text with different types
Stars: ✭ 252 (+1580%)
Mutual labels:  coreanimation
Flightanimator
Advanced Natural Motion Animations, Simple Blocks Based Syntax
Stars: ✭ 588 (+3820%)
Mutual labels:  coreanimation
Core Animation Pie Chart
Pie Chart built using CAShapeLayers, a CADisplayLink and custom layer properties
Stars: ✭ 107 (+613.33%)
Mutual labels:  coreanimation
FluentTransitions
▶ Smooth UI animations & transitions for .NET
Stars: ✭ 27 (+80%)
Mutual labels:  coreanimation
CircleFlow
CircleFlow is a project that revises Coverflow effect. Using Core Animation to build Coverflow-like effect but with a half-circle path
Stars: ✭ 39 (+160%)
Mutual labels:  coreanimation
Decomposed
CATransform3D manipulation made easy.
Stars: ✭ 184 (+1126.67%)
Mutual labels:  coreanimation

Lotus

Language Build Status codecov Version License Platform

Lotus – powerful nano framework that helps implement layer animation with easy syntax. This DSL relieves you from routine code of making animations via CoreAnimation.

Lotus

for i in 0..<10 {
    let petalLayer = PetalLayer()
    petalLayer.position = CGPoint(x: view.frame.width / 2, y: view.frame.height / 2 + 60)

    let direction: CGFloat = i % 2 == 0 ? -1.0 : 1.0
    let initialRotationDegree = 3.0 * CGFloat(i / 2) * .pi / 180.0
    let rotateTransform = CGAffineTransform.identity.rotated(by: direction * initialRotationDegree)
    petalLayer.setAffineTransform(rotateTransform)
    view.layer.addSublayer(petalLayer)

    let rotationDegree = 12.0 * CGFloat(i / 2) * .pi / 180.0
    petalLayer.lotus.runAnimation { make in
        make.opacity.to(0.7).during(0.7).delay(1.0)
    }.then { make in
        make.rotation.to(direction * rotationDegree).during(0.6)
    }.then { make in
        make.scaling.to(1.2).delay(0.3).during(1.5).ease(.outElastic)
    }
}

Contents

Getting started

These instructions will help you to integrate Lotus into your project.

Requirements

  • Xcode 10.2+

Installing

CocoaPods

1. In terminal switch to your repository with project
2. Specify Lotus in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'Lotus'
end

3. Run pod install command

Usage

1. Import Lotus into your project

import Lotus

2. Create any layer and add to view's hierarchy

let redSquareLayer = CALayer()
redSquareLayer.frame = CGRect(x: 50, y: 50, width: 100, height: 100)
view.layer.addSublayer(redSquareLayer)

3. Then run any needed animation whenever you need

redSquareLayer.lotus.runAnimation { make in
    make.scaling.to(2.0)
}

Documentation

Find out all accessible facilities in Documentation

Contributing

If you found any bug, have great new feature or want to improve documentation – you're welcome! Go to issue page, choose template, write details and we will answer you as soon as possible.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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].