TKCardModalViewController Class Reference
Inherits from | TKCustomPresentationViewController : UIViewController |
Conforms to | UICollisionBehaviorDelegate |
Declared in | TKCardModalViewController.h TKCardModalViewController.m |
Overview
TKCardModalViewController
is a custom presented UIViewController
with a main white card view that drops in and can be easily dismissed
similiar to a UIAlertView
.
Tasks
Other Methods
-
contentView
property -
backgroundView
property -
throwToDismissEnabled
property -
tapToDismissEnabled
property -
onlyAllowTapOffCardToDismiss
property -
visibleFrame
property -
velocity
property -
animator
property -
attachmentBehavior
property -
pushBehavior
property -
itemBehavior
property -
– keyboardWillShow:
-
– keyboardWillHide:
-
– show
-
– hide
-
– tapped:
-
– pan:
Other Methods
Properties
animator
The animator that controls the card physics animation.
@property (nonatomic, strong) UIDynamicAnimator *animator
Declared In
TKCardModalViewController.h
attachmentBehavior
The animator that controls the card physics animation.
@property (nonatomic, strong) UIAttachmentBehavior *attachmentBehavior
Declared In
TKCardModalViewController.h
backgroundView
The background view that appears behind the content view. Place and snapshots or backdrops here.
@property (nonatomic, strong) UIView *backgroundView
Declared In
TKCardModalViewController.h
contentView
The main card view that appears that content should be placed on.
@property (nonatomic, strong) UIView *contentView
Declared In
TKCardModalViewController.h
itemBehavior
The item behavior of the card.
@property (nonatomic, strong) UIDynamicItemBehavior *itemBehavior
Declared In
TKCardModalViewController.h
onlyAllowTapOffCardToDismiss
Flag to only allow the user to tap off the card and not on the contentView itself. Default is FALSE.
@property (nonatomic, assign) BOOL onlyAllowTapOffCardToDismiss
Declared In
TKCardModalViewController.h
pushBehavior
The push behavior from the velocity of the pan gesture.
@property (nonatomic, strong) UIPushBehavior *pushBehavior
Declared In
TKCardModalViewController.h
tapToDismissEnabled
Flag to enabled tap to dismiss the card. Default is TRUE.
@property (nonatomic, assign) BOOL tapToDismissEnabled
Declared In
TKCardModalViewController.h
throwToDismissEnabled
Flag that allows the the user to throw the card off to dismiss it. Default is TRUE.
@property (nonatomic, assign) BOOL throwToDismissEnabled
Declared In
TKCardModalViewController.h
Instance Methods
dismissTransitionAnimation:containerView:toViewController:
Subclass this method to create a custom dismissal transition.
- (void)dismissTransitionAnimation:(id<UIViewControllerContextTransitioning>)transitionContext containerView:(UIView *)containerView toViewController:(UIViewController *)viewController
Parameters
- transitionContext
The
UIViewControllerContextTransitioning
that governs the presentation.
- containerView
The container view to place this view controller’s view.
- toViewController
The parent view controller.
Declared In
TKCustomPresentationViewController.h
keyboardWillHide:
A notification callback that a keyboard will hide.
- (void)keyboardWillHide:(NSNotification *)notification
Parameters
- notification
The
NSNotification
sender.
Declared In
TKCardModalViewController.h
keyboardWillShow:
A notification callback that a keyboard will be shown.
- (void)keyboardWillShow:(NSNotification *)notification
Parameters
- notification
The
NSNotification
sender.
Declared In
TKCardModalViewController.h
pan:
The function called when a pan gesture is called. For subclassing.
- (void)pan:(UIPanGestureRecognizer *)gesture
Parameters
- gesture
The
UIPanGestureRecognizer
sender.
Declared In
TKCardModalViewController.h
presentTransitionAnimation:containerView:fromViewController:
Subclass this method to create a custom presentation transition.
- (void)presentTransitionAnimation:(id<UIViewControllerContextTransitioning>)transitionContext containerView:(UIView *)containerView fromViewController:(UIViewController *)viewController
Parameters
- transitionContext
The
UIViewControllerContextTransitioning
that governs the presentation.
- containerView
The container view to place this view controller’s view.
- fromViewController
The parent view controller.
Declared In
TKCustomPresentationViewController.h