A view controller module for displaying floating modal views within your iOS app.
Simply plop this repo into your project, and you should be good to go.
UIViewController *customContentViewController = [[UIViewController alloc] init];
customContentViewController.view.frame = CGRectMake(10, 20, 300, 200); // set intended 'visible' frame
customContentViewController.view.backgroundColor = [UIColor white];
customContentViewController.view.layer.masksToBounds = YES;
customContentViewController.view.layer.cornerRadius = 6;
LPModalViewController *modalViewController = [[BZModalViewController alloc] init];
[modalViewController useContentViewController:myModalContentViewController];
modalViewController.revealTransition = LPModalTransitionSlideUp;
modalViewController.dismissTransition = LPModalTransitionSlideDown;
[modalViewController revealWithCompletion:^(BOOL finished) {}];
…
[modalViewController dismissWithCompletion:^(BOOL finished) {}];
typedef enum {
LPModalTransitionFade,
LPModalTransitionNone,
LPModalTransitionSlideUp,
LPModalTransitionSlideDown
} LPModalTransition;
LPModalViewController
is subclassable! Subclassing is great for customizing modal transitions and subview appearance.