Skip to content

paoloboschini/Icomations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icomations

Swifty hamburger animations

alt tag

Basic Usage

See example project for a demo.

Import Icomation.swift in your project. Add a button to your view via Interface Builder, change the class to Icomation in the Identity Inspector and connect an outlet to it. Or create a new Icomation in code

var icomation = Icomation(frame: CGRectMake(0, 0, 50, 50))
view.addSubview(icomation)

Set a type

icomation.type = IconType.ArrowUp

Choose a color for each segment (default is white)

icomation.topShape.strokeColor = UIColor.redColor().CGColor
icomation.middleShape.strokeColor = UIColor.blueColor().CGColor
icomation.bottomShape.strokeColor = UIColor.blackColor().CGColor

Set a duration for the animation

icomation.animationDuration = 1.0

Set the number of rotations for the animation

icomation.numberOfRotations = 3

About

Swifty hamburger animations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages