JagCesar/iOS-blur
关于
为 UIView 添加模糊效果。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- 0
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文iOS-blur
In iOS 7 a new view is shown in several places that is transparent and has a nice blur effect. However Apple hasn't given us a public API to use this amazing view.
Apple gave us some sample code at WWDC that blurs an UIImage object. It looks great, but isn't as cool as a view that blurs the views behind it in realtime.
I needed this in one of my projects, so after some thinking I came up with a brilliant and simple idea. It only works for iOS 7.
Screenshot

How is it done?
I simply took a UIToolbar, placed it as a subview and voila!
Awesome! So, how do I use it?
You just use it as any normal UIView object. I wanted it to be as simple as possible, and I think I've managed to do just that.
To use it you copy JCRBlurView.h and JCRBlurView.m to your project. Make sure to import it, initialise it, set a frame and add it to your view. That's it! :)
JCRBlurView *blurView = [JCRBlurView new];
[blurView setFrame:CGRectMake(0.0f,0.0f,100.0f,100.0f)];
[self.view addSubview:blurView];
If you prefer using Auto Layout that works great too!
What about using it as a cocoapod? It would be SO much easier!
Just add: pod 'iOS-blur' to your Podfile and run pod install
License
iOS-blur is released under the WTFPL-license (see the LICENSE file)
探索相关项目
加载中…