Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
NCVibrantLightStyling: Difference between revisions - iPhone Development Wiki

NCVibrantLightStyling: Difference between revisions

From iPhone Development Wiki
(Created page with "'''NCVibrantLightStyling``` is a subclass of NCVibrantStyling {{occlass|library=UserNotificationsUIKit.framework|navbox=1}}")
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''NCVibrantLightStyling``` is a subclass of NCVibrantStyling
'''NCVibrantLightStyling''' is a subclass of NCVibrantStyling
 
==Source Code==
<source lang="objc">
@implementation NTXVibrantLightStyling
- (_UIVisualEffectLayerConfig *)_layerConfig {
  NSDictionary *filterAttributes = @{@"inputReversed":[NSNumber numberWithBool:[self _inputReversed]]};
  _UIVisualEffectVibrantLayerConfig *layerConfig;
  layerConfig = [_UIVisualEffectVibrantLayerConfig layerWithVibrantColor:[self _burnColor]
tintColor:[self _darkenColor]
      filterType:[self blendMode]
        filterAttributes:filterAttributes];
  return layerConfig;
}
- (NSString *)blendMode {
  return kCAFilterVibrantLight;
}
- (CAFilter *)composedFilter {
  if (![self valueForKey:@"_composedFilter"]) {
CAFilter *composedFilter = [CAFilter filterWithType:[self blendMode]];
[composedFilter setValue:(id)[[self _burnColor] CGColor] forKey:@"inputColor0"];
[composedFilter setValue:(id)[[self _darkenColor] CGColor] forKey:@"inputColor1"];
[composedFilter setValue:[NSNumber numberWithBool:[self _inputReversed]] forKey:@"inputReversed"];
[self setValue:composedFilter forKey:@"_composedFilter"];
  }
  return (CAFilter *)[self valueForKey:@"_composedFilter"];
}
@end
</source>


{{occlass|library=UserNotificationsUIKit.framework|navbox=1}}
{{occlass|library=UserNotificationsUIKit.framework|navbox=1}}

Latest revision as of 00:43, 23 December 2016

NCVibrantLightStyling is a subclass of NCVibrantStyling

Source Code

@implementation NTXVibrantLightStyling
- (_UIVisualEffectLayerConfig *)_layerConfig {
   NSDictionary *filterAttributes = @{@"inputReversed":[NSNumber numberWithBool:[self _inputReversed]]};
   _UIVisualEffectVibrantLayerConfig *layerConfig;
   layerConfig = [_UIVisualEffectVibrantLayerConfig layerWithVibrantColor:[self _burnColor]
								tintColor:[self _darkenColor]
							       filterType:[self blendMode]
						         filterAttributes:filterAttributes];
   return layerConfig;
}
- (NSString *)blendMode {
   return kCAFilterVibrantLight;
}
- (CAFilter *)composedFilter {
   if (![self valueForKey:@"_composedFilter"]) {
	CAFilter *composedFilter = [CAFilter filterWithType:[self blendMode]];
	[composedFilter setValue:(id)[[self _burnColor] CGColor] forKey:@"inputColor0"];
	[composedFilter setValue:(id)[[self _darkenColor] CGColor] forKey:@"inputColor1"];
	[composedFilter setValue:[NSNumber numberWithBool:[self _inputReversed]] forKey:@"inputReversed"];
	[self setValue:composedFilter forKey:@"_composedFilter"];
   }
   return (CAFilter *)[self valueForKey:@"_composedFilter"];
}
@end