Skip to content

Tangdixi/DCExplosion

Repository files navigation

DCExplosion

DemoGif

DCExplosion allow you to remove a view with explode animation. Written in Swift, using Protocol-Oriented Programming

How To Get Started

git clone git@github.com:Tangdixi/DCExplosion.git

##Installation

Drag the Source into your project.
Well, it is strongly recommended that you install via CocoaPods

Usage

  • Conform the protocol
extension UIView:Explodable { }
  • Explode a view and remove it from superView
yourView.explode(duration: 1)
  • Explode a view and remove it from superView using the specified direction
imageView.explode(.Chaos, duration: 1)
  • Explode a view and remove it from superView using the specified direction and completion handler
imageView.explode(.Chaos, duration: 1) {
	// do something here ...
}
  • Explode a TableViewCell and delete it from UITableView using the specified direction and completion handler
tableView.explodeRowAtIndexPath(indexPath, duration:1 ,direction: .Chaos) {
      dataSource.removeAtIndex(indexPath.row)
}

Documentation

Xcode Quick Help Documentation Supported

Bug, Suggestions

Just open an issue ~

TODO

  • Remove a UICollectionCell with explode animation
  • More than explosion style

License

DCExplosion is available under the MIT license. See the LICENSE file for more info.

About

Remove a view with explosion animation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages