CKTextKitShadower Class Reference
Inherits from | NSObject |
---|---|
Declared in | CKTextKitShadower.h |
shadowOffset
The offset from the top-left corner at which the shadow starts.
@property (nonatomic, readonly, assign) CGSize shadowOffset
Discussion
A positive width will move the shadow to the right. A positive height will move the shadow downwards.
Declared In
CKTextKitShadower.h
– shadowPadding
The edge insets which represent shadow padding
- (UIEdgeInsets)shadowPadding
Discussion
Each edge inset is less than or equal to zero.
Example: CGRect boundsWithoutShadowPadding; // Large enough to fit text, not large enough to fit the shadow as well UIEdgeInsets shadowPadding = [shadower shadowPadding]; CGRect boundsWithShadowPadding = UIEdgeInsetsRect(boundsWithoutShadowPadding, shadowPadding);
Declared In
CKTextKitShadower.h
– setShadowInContext:
draws the shadow for text in the provided CGContext
- (void)setShadowInContext:(CGContextRef)context
Discussion
Call within the text node’s +drawRect method
Declared In
CKTextKitShadower.h