Use navigation bar for image editor buttons.

pull/2/head
Matthew Chen 7 years ago
parent e47ceab41c
commit 00aa5be55d

@ -40,6 +40,7 @@ public class ImageEditorView: UIView {
updateButtons() updateButtons()
updateGestureState() updateGestureState()
delegate?.imageEditorUpdateNavigationBar()
} }
} }
@ -264,12 +265,19 @@ public class ImageEditorView: UIView {
let captionButton = navigationBarButton(imageName: "image_editor_caption", let captionButton = navigationBarButton(imageName: "image_editor_caption",
selector: #selector(didTapCaption(sender:))) selector: #selector(didTapCaption(sender:)))
switch editorMode {
case .text:
return []
case .brush:
return []
case .none:
if model.canUndo() { if model.canUndo() {
return [undoButton, newTextButton, brushButton, cropButton, captionButton] return [undoButton, newTextButton, brushButton, cropButton, captionButton]
} else { } else {
return [newTextButton, brushButton, cropButton, captionButton] return [newTextButton, brushButton, cropButton, captionButton]
} }
} }
}
// MARK: - Actions // MARK: - Actions

Loading…
Cancel
Save