TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2015 |
Maintained by Rapple UI Animator.
Simple and easy to use animator library for UIView and UIViewController based animations
Deploymen target - iOS 8.0 or higher
RappleUIAnimator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "RappleUIAnimator"
Rajeev Prasad, [email protected]
RappleUIAnimator is available under the MIT license. See the LICENSE file for more info.
Objc ->
#import <RappleUIAnimator/RappleUIAnimator.h>
Swift ->
import RappleUIAnimator
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)
}
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")
}
}
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()
}