Classes
The following classes are available globally.
-
TCMask is the masking result from TCMaskView
See moreDeclaration
Swift
class TCMask : NSObject
Objective-C
@interface TCMask : NSObject
-
The module that displays a UIViewController for image masking. A minimum implementation to present a TCMaskview within a UIViewController class is:
See more// Create TCMaskView, specifying the image for masking. let maskView = TCMaskView(image: self.image) // Present TCMaskView from current view controller. maskView.present(from: self, animated: true)
Declaration
Swift
class TCMask : NSObject
Objective-C
@interface TCMask : NSObject
-
TCMaskViewMode defines how the current masking result is shown to the user, the result value (v) shown to user is blended with current mask (m) by foreground image/color (f) and background image/color (b):
- If inverted is false: v = f * m + b * (1 - m)
- If inverted is true: v = f * (1 - m) + b * m
For both foreground and background settings:
- If image is not nil, image will be used
- If image is nil and color is not nil, color will be used
- If both image and color are nil, foreground will be set to a PNG transparent color and background will be set to the image of masking
Declaration
Swift
class TCMask : NSObject
Objective-C
@interface TCMask : NSObject
-
The TCUIView defines a UI component in TCMaskView. You can change the property in TCUIView to customize the UI style of TCMaskView
See moreDeclaration
Swift
class TCMask : NSObject
Objective-C
@interface TCMask : NSObject