DNFlyingBadges 0.1.1

DNFlyingBadges 0.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2015

Maintained by David Norman.




version 0.1 (beta)

This is still beta quality code - feel free to test, create issues, etc. The library doesn't use any private APIs - apps using it should be fine for release on the App Store.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

DNFlyingBadges is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DNFlyingBadges"

Intro

DNFlyingBadges is an easy to use and fun control for quick contextual user notification. Rather than the traditional loading or alert that often covers the view and requires user interaction DNFlyingBadges are quick and contextually relevant indicators that can be customized for a variety of situations using a single library.

Examples

DNFlyingBadges is built to accomodate many different scernarios. Here are only a few:

To start off you'll want to create a new FlyingBadgeView

var flyingBadgeView = DNFlyingBadgesView(frame: CGRectMake(0, 0, 40, 40), imageName: DNFlyingBadgesView.Image.Hipster)

(Optional) Customize the color if you'd like, the default is green

flyingBadgeView.color = UIColor.greenColor()

Now present the FlyingBadgeView by passing it a view and a point. You can optionally add a single rotation or a continuous spinning rotation

flyingBadgeView.rotateAndAnimateFlyingBadgeFromTopInView(tap.view!, toPoint: point, rotation: M_PI, continuousRotation: true, forTime:4) {
println("finished animation") //Handy Animation Completion Closure
}

Multiple badges at any point

As another example you can easily use DNFlyingBadges with multiple cells of a UITableViewController to provide contextual info about each individual cell.

flyingBadgeView.rotateAndAnimateFlyingBadgeFromBottomInView(self.view, toPoint: CGPointMake(cell!.center.x, cell!.center.y), rotation: M_PI, continuousRotation: false, forTime:1) {
println("animation finished")
self.tableView.reloadData()            }
}

Easy use with Table Cells

Credit

Author: David Norman

Includes JNWSpringAnimation by JONATHAN WILLING

Includes free icons from: icomoon

License

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