|
|
@ -24,7 +24,8 @@ public class ImageEditorView: UIView {
|
|
|
|
|
|
|
|
|
|
|
|
private let canvasView: ImageEditorCanvasView
|
|
|
|
private let canvasView: ImageEditorCanvasView
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: We could hang this on the model or make this static.
|
|
|
|
// TODO: We could hang this on the model or make this static
|
|
|
|
|
|
|
|
// if we wanted more color continuity.
|
|
|
|
private var currentColor = ImageEditorColor.defaultColor()
|
|
|
|
private var currentColor = ImageEditorColor.defaultColor()
|
|
|
|
|
|
|
|
|
|
|
|
@objc
|
|
|
|
@objc
|
|
|
@ -444,7 +445,8 @@ public class ImageEditorView: UIView {
|
|
|
|
let cropTool = ImageEditorCropViewController(delegate: self, model: model, srcImage: srcImage, previewImage: previewImage)
|
|
|
|
let cropTool = ImageEditorCropViewController(delegate: self, model: model, srcImage: srcImage, previewImage: previewImage)
|
|
|
|
self.delegate?.imageEditor(presentFullScreenView: cropTool,
|
|
|
|
self.delegate?.imageEditor(presentFullScreenView: cropTool,
|
|
|
|
isTransparent: false)
|
|
|
|
isTransparent: false)
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MARK: -
|
|
|
|
// MARK: -
|
|
|
|
|
|
|
|
|
|
|
@ -498,6 +500,8 @@ extension ImageEditorView: ImageEditorTextViewControllerDelegate {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
model.append(item: newItem)
|
|
|
|
model.append(item: newItem)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.currentColor = color
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public func textEditDidCancel() {
|
|
|
|
public func textEditDidCancel() {
|
|
|
@ -520,6 +524,7 @@ extension ImageEditorView: ImageEditorCropViewControllerDelegate {
|
|
|
|
// MARK: -
|
|
|
|
// MARK: -
|
|
|
|
|
|
|
|
|
|
|
|
extension ImageEditorView: ImageEditorBrushViewControllerDelegate {
|
|
|
|
extension ImageEditorView: ImageEditorBrushViewControllerDelegate {
|
|
|
|
public func brushDidComplete() {
|
|
|
|
public func brushDidComplete(currentColor: ImageEditorColor) {
|
|
|
|
|
|
|
|
self.currentColor = currentColor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|