Protocol
ADImageEditTool
public protocol ADImageEditTool: ADImageEditToolCodable
An ADImageEditTool
would be used to edit image.
Relationships
Conforms To
ADImageEditToolCodable
Use to save or revert edit tool info.
Default Implementations
selectImage
var selectImage: UIImage?
Requirements
image
var image: UIImage
Tool's icon for default state. Which is display on bottom of the edit controller.
selectImage
var selectImage: UIImage?
Tool's icon for select state. Which is display when tool is selected.
isSelected
var isSelected: Bool
Changed when tool selected or not.
contentLockStatus
var contentLockStatus: ((Bool) -> Void)?
Block to lock or unlock edit content view. When lock, content view will scroll disabled.
toolConfigView
var toolConfigView: (UIView & ADToolConfigable)?
View showed when tool is selected, use to change tool's setting. Return nil
if no needed.
toolInteractView
var toolInteractView: (UIView & ADToolInteractable)?
View interaction with user operations. Return nil
if no needed.
toolDidSelect(ctx:)
func toolDidSelect(ctx: UIViewController?) -> Bool
Called when tool is selected.
Parameters
Name | Type | Description |
---|---|---|
ctx | UIViewController? |
The controller to present tool's detail view. |
Returns
Return true
if tool can seleced and deselect last selected tool. Otherwise, return false
.