在弹出视图中显示带有模糊背景的 UIViewController。在 中国空气质量指数 中引入。
需要 iOS 7.0+。"扔掉以关闭"的手势灵感来源于 Tweetbot。
注意:RWBlurPopover 的 3.0.0 版本与之前的版本不兼容。
podfile
pod 'RWBlurPopover', '~> 3.0.0'
或者
RWBlurPopover
中的 .h
和 .m
文件拖放到项目中。通过使用 #import <RWBlurPopover/RWBlurPopover.h>
在需要时包含 RWBlurPopover。
在弹出视图中显示带有模糊背景的 UIViewController
[RWBlurPopover showContentViewController:contentViewController insideViewController:presentingViewController];
或者
RWBlurPopover *popover = [[RWBlurPopover alloc] initWithContentViewController:nav];
[popover showInViewController:self];
popover.tapBlurToDismiss = NO;
popover.throwingGestureEnabled = NO;
[contentViewController dismissViewControllerAnimated:YES completion:nil];
MIT 许可证