RappleUIAnimator 0.2.0

RappleUIAnimator 0.2.0

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

Maintained by Rapple UI Animator.



  • By
  • Rajeev Prasad

Simple and easy to use animator library for UIView and UIViewController based animations

Requirements

Deploymen target - iOS 8.0 or higher

Installation

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

pod "RappleUIAnimator"

Author

Rajeev Prasad, [email protected]

License

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

Usage

Objc ->

    #import <RappleUIAnimator/RappleUIAnimator.h> 

Swift ->

    import RappleUIAnimator
Rapple Modal presentation animator

first add a globle var to keep RappleTransitionDelegate

    var transitionDelegate : RappleTransitionDelegate?

then create your viewcontroller and set transitioningDelegate before present

        if let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("ModalViewController") as? ModalViewController {
            transitionDelegate = RappleTransitionDelegate(viewController: vc, direction: RappleDirectionLeftToRight);
            vc.transitioningDelegate = transitionDelegate
            self.presentViewController(vc, animated: true, completion: nil)
        }

alt tag

Rapple alert view

Open alert view with a message and button titles and completion handles

        let alert = RappleAlertView(message: "Rapple alert view is awsome!!!", cancel: "Cancel", ok: "OK");
        alert.setAttributes([RappleAlertButtonTextColor : UIColor.whiteColor(), RappleAlertButtonPanelColor : RappleColor.rappleBlue()])
        alert.show { (button) -> Void in
            if button.value ==  RappleAlertCancelButton.value {
                println("Cancel Tapped") ;
            } else if button.value == RappleAlertOKButton.value {
                println("OK Tapped")
            }
        }

alt tag

Rapple Popover view

first add a globle var to keep RapplePOPView

    var pop : RapplePOPView? 

then create your viewcontroller and set and open with RapplePOPView

        if let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("RapplePOPViewController") as? RapplePOPViewController {
            vc.popDelegate = self
            pop = RapplePOPView(customViewController: vc, size: CGSizeMake(300, 400))
            pop!.delegate = self
            pop!.setBorderColor(UIColor.lightGrayColor(), borderWidth: 2)
            pop!.show()
        }

alt tag