Show a UIViewController in a popover with background blurred. Introduced in China Air Quality Index.
iOS 7.0+ is required. "Throwing away to dismiss" gesture is inspired by Tweetbot.
NOTE: Release 2.0.0 of RWBlurPopover is incompatible with previous releases.
-
Add a pod description into your
podfile
:pod 'RWBlurPopover', '~> 2.0.0'
OR
- Clone this repo, drop
.h
and.m
files fromRWBlurPopover
into your project.
-
Include RWBlurPopover whenever you need it with
#import <RWBlurPopover/RWBlurPopover.h>
. -
Present a UIViewController inside a popover with background blurred:
UIViewController *popoverContentViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
RWBlurPopover *popover = [[RWBlurPopover alloc] initWithContentViewController:vc];
[parentViewController presentViewController:popover animated:YES completion:nil];
- Dismiss the view controller presented by RWBlurPopover:
[popoverContentViewController dismissViewControllerAnimated:YES completion:nil];
MIT License