forked from alexdrone/ios-realtimeblur
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Usbergo
committed
Jul 3, 2013
1 parent
ebe4bf4
commit f7c4955
Showing
2 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,64 @@ | ||
ios-realtimeblur | ||
================ | ||
|
||
Real-time blur view, like in iOS 7 | ||
Real-time blur view, like in iOS 7. (on iOS5,6 and 7) | ||
|
||
 | ||
|
||
Usage | ||
-------------------- | ||
|
||
Instantiate it and use it as any other view :) | ||
If you want to have a static rendering (useful if your view is presented modally) just set | ||
|
||
blurView.renderStatic = YES; | ||
|
||
|
||
Rember to set renderStatic to YES everytime you want to animate the view (you can always set it to NO in the completion block) | ||
|
||
|
||
blurView.renderStatic = YES; | ||
blurView.alpha = 0.f; | ||
|
||
//show aniamtion | ||
[UIView animateWithDuration:1 animations:^{ | ||
blurView.alpha = 1.f; | ||
} completion:^(BOOL finished) { | ||
blurView.renderStatic = NO; | ||
}]; | ||
|
||
|
||
You can set the tint color of the view via the tint property (still TODO: use iOS7 tintColor ;)) - The default one is clearColor | ||
|
||
|
||
In DRNRealTimeBlurView.h there are some constants that you can tweak to improve the smoothness/performances of the view or to define some default values. | ||
|
||
//adjust jpeg quality (lower = higher perf) | ||
#define kDRNRealTimeBlurViewScreenshotCompression 0.01 | ||
|
||
//the blur radius | ||
#define kDRNRealTimeBlurViewBlurRadius 1 | ||
|
||
//the default corner radius for all the DRNRealTimeBlurViews | ||
#define kDRNRealTimeBlurViewDefaultCornerRadius 20 | ||
|
||
//the view is rendered every kDRNRealTimeBlurViewRenderPeriod seconds | ||
//tweak this value to have a smoother or a more perfomant rendering | ||
#define kDRNRealTimeBlurViewRenderPeriod 0.1 | ||
|
||
//The tint color alpha | ||
#define kDNRRealTimeBlurTintColorAlpha 0.1 | ||
|
||
|
||
TODO | ||
-------------------- | ||
|
||
* Improve it ;) | ||
* Cocoapod | ||
|
||
|
||
Credits | ||
-------------------- | ||
|
||
If you use this component in your app, please add some credits :) | ||
|