NAModalSheet 以模糊后的背景图呈现您的视图控制器 - 在 iOS 6 和 7 上进行过测试,但应可在 iOS 5 上使用。
使用您的视图控制器和展示样式初始化 NAModalSheet:sheets 可以从顶部或底部滑入,或者从中心淡入。
//Create a view controller to display as a sheet
SampleSheetViewController *svc = [[SampleSheetViewController alloc] init];
//Initialize an NAModalSheet view controller with it
NAModalSheet *sheet = [[NAModalSheet alloc] initWithViewController:svc presentationStyle:NAModalSheetPresentationStyleSlideInFromTop];
[sheet presentWithCompletion:^{
// block called when your view is fully presented
}];
在使用滑动展示样式时,如果需要,在展示前指定内边距值。这将导致视图从屏幕边缘指定的距离滑入。您可以使用此功能使视图看起来像从导航栏下滑出。
sheet.slideInset = [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.frame.size.height;
您要展示的视图应该是半透明的,以允许模糊的背景图像显示出来。50% 不透明的白色效果良好。
订阅模糊代码在一个博客文章在 IndieAmbitions.com 公开提出
http://indieambitions.com/idevblogaday/perform-blur-vimage-accelerate-framework-tutorial