No edit summary |
(Reference CABackdropLayer) |
||
Line 1: | Line 1: | ||
'''_UIBackdropView''' is a private class in [[UIKit.framework]] (iOS 7.0 +), which is used for the popular blur effects. | '''_UIBackdropView''' is a private class in [[UIKit.framework]] (iOS 7.0+), which is used for the popular blur effects. | ||
It uses a [[CAFilter#gaussianBlur|gaussianBlur CAFilter]].<ref>https://twitter.com/conradev/status/380905728393117696</ref> | It uses a [[CABackdropLayer]] with a [[CAFilter#gaussianBlur|gaussianBlur CAFilter]].<ref>https://twitter.com/conradev/status/380905728393117696</ref> | ||
== Example == | |||
<source lang="objc"> | <source lang="objc"> |
Revision as of 23:37, 12 April 2014
_UIBackdropView is a private class in UIKit.framework (iOS 7.0+), which is used for the popular blur effects.
It uses a CABackdropLayer with a gaussianBlur CAFilter.[1]
Example
Class UIBackDropView = objc_getClass("_UIBackdropView");
if (UIBackDropView)
{
id settings = nil;
Class _UIBackdropViewSettingsAdaptiveLight = objc_getClass("_UIBackdropViewSettingsAdaptiveLight");
if (_UIBackdropViewSettingsAdaptiveLight)
{
settings = [_UIBackdropViewSettingsAdaptiveLight settingsForStyle:2060]; // 2060 is the system control center background view style
}
UIView * backView = (UIView *) [[UIBackDropView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)
autosizesToFitSuperview:YES
settings:settings];
[self addSubview:backView];
[backView release];
}
References