All Projects → Antondomashnev → Adpuzzleanimation

Antondomashnev / Adpuzzleanimation

Licence: mit
Inspired by Fabric - Answers animation. Allows to "build" given view with pieces. Allows to "destroy" given view into pieces

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Adpuzzleanimation

Puzzlemaker
Swift framework responsible for generating puzzles from the image
Stars: ✭ 99 (-19.51%)
Mutual labels:  puzzle, cocoapods, carthage
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+8604.07%)
Mutual labels:  cocoapods, carthage
Fontawesome.swift
Use FontAwesome in your Swift projects
Stars: ✭ 1,513 (+1130.08%)
Mutual labels:  cocoapods, carthage
Pincodeinputview
A input text view for entering pin code.
Stars: ✭ 108 (-12.2%)
Mutual labels:  cocoapods, carthage
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-3.25%)
Mutual labels:  cocoapods, carthage
Fscalendar
A fully customizable iOS calendar library, compatible with Objective-C and Swift
Stars: ✭ 9,829 (+7891.06%)
Mutual labels:  cocoapods, carthage
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+29896.75%)
Mutual labels:  cocoapods, carthage
Tkdotsegment
TKDotSegment is a segment with dot animation
Stars: ✭ 103 (-16.26%)
Mutual labels:  cocoapods, carthage
Randomkit
Random data generation in Swift
Stars: ✭ 1,458 (+1085.37%)
Mutual labels:  cocoapods, carthage
Device
Light weight tool for detecting the current device and screen size written in swift.
Stars: ✭ 1,503 (+1121.95%)
Mutual labels:  cocoapods, carthage
Actionclosurable
Extensions which helps to convert objc-style target/action to swifty closures
Stars: ✭ 120 (-2.44%)
Mutual labels:  cocoapods, carthage
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+1152.03%)
Mutual labels:  cocoapods, carthage
Buckets Swift
Swift Collection Data Structures Library
Stars: ✭ 106 (-13.82%)
Mutual labels:  cocoapods, carthage
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+1348.78%)
Mutual labels:  cocoapods, carthage
Ccnpreferenceswindowcontroller
CCNPreferencesWindowController is an Objective-C subclass of NSWindowController that automatically manages your custom view controllers for handling app preferences.
Stars: ✭ 105 (-14.63%)
Mutual labels:  cocoapods, carthage
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+8055.28%)
Mutual labels:  cocoapods, carthage
Microfeatures Example
📦📱 Example of iOS app built using the uFeatures architecture
Stars: ✭ 112 (-8.94%)
Mutual labels:  cocoapods, carthage
Sdwebimagewebpcoder
A WebP coder plugin for SDWebImage, use libwebp
Stars: ✭ 101 (-17.89%)
Mutual labels:  cocoapods, carthage
Rdgliderviewcontroller Swift
Control for a floating view gliding over a ViewController Edit
Stars: ✭ 102 (-17.07%)
Mutual labels:  cocoapods, carthage
Szmentionsswift
Library to help handle mentions
Stars: ✭ 109 (-11.38%)
Mutual labels:  cocoapods, carthage

ADPuzzleAnimation

CocoaPods Compatible Carthage compatible codebeat badge

Whats inside

Custom animation for UIView inspired by Fabric - Answers animation.

Easy to use

To create your first animation you need to know only about one method:

/**
 Designated initializer for puzzle animation and it's subclasses
 
 - parameter viewToAnimate: view to render into pieces
 - parameter configuration: animation configuration
 
 - returns: newly created animation instance
 */
init(viewToAnimate: UIView, configuration: PuzzleAnimationConfiguration = PuzzleAnimationConfiguration())

It's flixible - you can configure almost any parameter for the animation:

/**
 *  Defines the structure that contains configurable parameters for puzzle animation
*/
struct PuzzleAnimationConfiguration {

  /// Defines the animation velocity. Higher velocity less animation duration
  var animationVelocity: NSTimeInterval = 1

  /// Defines the delay between each piece in piece's group animation
  var pieceAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceAnimationDelay

  /// Defines the delay between each group of pieces animation
  var pieceGroupAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceGroupAnimationDelay

  /// Defines the animation piece's scale
  var animationScale: Double = 2.5

  /// Each piece represents square and this value represents the number of pixels of square side
  var pieceSide: CGFloat = 40
}

Handle callbacks about status to start new animation or do something else:

/// Called when animation completed, stoped or failed
/// @note You can set it any time even during the animation
public var animationCompletion: PuzzleAnimationCompletion?

Intuitive and simple interface:

/**
 Starts the animation. Makes view to animate hidden
*/
public func start()
    
/**
 Stops the animation. Removes all pieces from superview. Makes view to animate visible
 */
public func stop()

For the complete example check the viewController.swift

Easy to install

CocoaPods

To integrate ADPuzzleAnimation into your Xcode project using CocoaPods, specify it in your Podfile:

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

pod 'PuzzleAnimation', '~> 1.1.1'

Carthage

To integrate ADPuzzleAnimation into your Xcode project using Carthage, specify it in your Cartfile:

github "Antondomashnev/ADPuzzleAnimation" ~> 1.1.1

Run carthage update to build the framework and drag the built ADPuzzleAnimation.framework into your Xcode project.

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