Andrewwiik (talk | contribs) No edit summary |
Andrewwiik (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
'''NCVibrantStyling''' is used to provide vibrancy parameters to be used for when applying a vibrancy effect to some part of the Noitfications UI. It mainly utilizes CAFilters, color, and alpha to achieve the desired effect. | '''NCVibrantStyling''' is used to provide vibrancy parameters to be used for when applying a vibrancy effect to some part of the Noitfications UI. It mainly utilizes CAFilters, color, and alpha to achieve the desired effect. It has many subclasses for different styles of vibrancy. | ||
==Source Code== | ==Source Code== | ||
<source lang="objc"> | |||
@implementation NCVibrantStyling | |||
- (UIColor *)_burnColor { | |||
return (UIColor *)[self valueForKey:@"_burnColor"]; | |||
} | |||
- (UIColor *)_darkenColor { | |||
return (UIColor *)[self valueForKey:@"_darkenColor"]; | |||
} | |||
- (BOOL)_inputReversed { | |||
return NO; | |||
} | |||
- (_UIVisualEffectLayerConfig *)_layerConfig { | |||
_UIVisualEffectTintLayerConfig *layerConfig; | |||
layerConfig = [_UIVisualEffectTintLayerConfig layerWithTintColor:[self color] | |||
filterType:[self blendMode]]; | |||
return layerConfig; | |||
} | |||
- (CGFloat)alpha { | |||
return self.alpha; | |||
} | |||
- (NSString *)blendMode { | |||
return (NSString *)[self valueForKey:@"_blendMode"]; | |||
} | |||
- (UIColor *)color { | |||
return (UIColor *)[self valueForKey:@"_color"]; | |||
} | |||
- (CAFilter *)composedFilter { | |||
return (CAFilter *)[self valueForKey:@"_composedFilter"]; | |||
} | |||
- (long long)style { | |||
return 0; | |||
} | |||
@end | |||
</source> | |||
{{occlass|library=UserNotificationsUIKit.framework|navbox=1}} | {{occlass|library=UserNotificationsUIKit.framework|navbox=1}} |
Latest revision as of 00:29, 23 December 2016
NCVibrantStyling is used to provide vibrancy parameters to be used for when applying a vibrancy effect to some part of the Noitfications UI. It mainly utilizes CAFilters, color, and alpha to achieve the desired effect. It has many subclasses for different styles of vibrancy.
Source Code
@implementation NCVibrantStyling
- (UIColor *)_burnColor {
return (UIColor *)[self valueForKey:@"_burnColor"];
}
- (UIColor *)_darkenColor {
return (UIColor *)[self valueForKey:@"_darkenColor"];
}
- (BOOL)_inputReversed {
return NO;
}
- (_UIVisualEffectLayerConfig *)_layerConfig {
_UIVisualEffectTintLayerConfig *layerConfig;
layerConfig = [_UIVisualEffectTintLayerConfig layerWithTintColor:[self color]
filterType:[self blendMode]];
return layerConfig;
}
- (CGFloat)alpha {
return self.alpha;
}
- (NSString *)blendMode {
return (NSString *)[self valueForKey:@"_blendMode"];
}
- (UIColor *)color {
return (UIColor *)[self valueForKey:@"_color"];
}
- (CAFilter *)composedFilter {
return (CAFilter *)[self valueForKey:@"_composedFilter"];
}
- (long long)style {
return 0;
}
@end