Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jagcesar/ios-blur
Blur a UIView
https://github.com/jagcesar/ios-blur
blur ios ios-blur objective-c
Last synced: 3 days ago
JSON representation
Blur a UIView
- Host: GitHub
- URL: https://github.com/jagcesar/ios-blur
- Owner: JagCesar
- License: wtfpl
- Created: 2013-07-01T13:19:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T17:13:00.000Z (over 7 years ago)
- Last Synced: 2024-12-20T21:10:01.369Z (3 days ago)
- Topics: blur, ios, ios-blur, objective-c
- Language: Objective-C
- Size: 906 KB
- Stars: 2,065
- Watchers: 77
- Forks: 212
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
![Screenshot](https://raw.github.com/JagCesar/iOS-blur/master/screenshot.png "Example of JCRBlurView")## 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](http://cocoapods.org/?q=ios-blur)? 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)