diff --git a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift index 4221b49f3..7909d9421 100644 --- a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift @@ -1156,32 +1156,28 @@ extension AttachmentPrepViewController: UIScrollViewDelegate { // MARK: - extension AttachmentPrepViewController: ImageEditorViewDelegate { - public func imageEditor(presentFullScreenOverlay viewController: UIViewController, - withNavigation: Bool) { + public func imageEditor(presentFullScreenView viewController: UIViewController, + isTransparent: Bool) { - if withNavigation { - let navigationController = OWSNavigationController(rootViewController: viewController) - navigationController.modalPresentationStyle = .overFullScreen + let navigationController = OWSNavigationController(rootViewController: viewController) + navigationController.modalPresentationStyle = (isTransparent + ? .overFullScreen + : .fullScreen) - if let navigationBar = navigationController.navigationBar as? OWSNavigationBar { - navigationBar.overrideTheme(type: .clear) - } else { - owsFailDebug("navigationBar was nil or unexpected class") - } - - self.present(navigationController, animated: false) { - // Do nothing. - } + if let navigationBar = navigationController.navigationBar as? OWSNavigationBar { + navigationBar.overrideTheme(type: .clear) } else { - self.present(viewController, animated: false) { - // Do nothing. - } + owsFailDebug("navigationBar was nil or unexpected class") + } + + self.present(navigationController, animated: false) { + // Do nothing. } } public func imageEditorPresentCaptionView() { let view = AttachmentCaptionViewController(delegate: self, attachmentItem: attachmentItem) - self.imageEditor(presentFullScreenOverlay: view, withNavigation: true) + self.imageEditor(presentFullScreenView: view, isTransparent: true) isShowingCaptionView = true } diff --git a/SignalMessaging/Views/ImageEditor/ImageEditorView.swift b/SignalMessaging/Views/ImageEditor/ImageEditorView.swift index 3638d5d96..d72d507a4 100644 --- a/SignalMessaging/Views/ImageEditor/ImageEditorView.swift +++ b/SignalMessaging/Views/ImageEditor/ImageEditorView.swift @@ -6,8 +6,8 @@ import UIKit @objc public protocol ImageEditorViewDelegate: class { - func imageEditor(presentFullScreenOverlay viewController: UIViewController, - withNavigation: Bool) + func imageEditor(presentFullScreenView viewController: UIViewController, + isTransparent: Bool) func imageEditorPresentCaptionView() func imageEditorUpdateNavigationBar() func imageEditorAttachmentCount() -> Int @@ -134,8 +134,8 @@ public class ImageEditorView: UIView { Logger.verbose("") let brushView = ImageEditorBrushViewController(delegate: self, model: model, currentColor: currentColor) - self.delegate?.imageEditor(presentFullScreenOverlay: brushView, - withNavigation: true) + self.delegate?.imageEditor(presentFullScreenView: brushView, + isTransparent: false) } @objc func didTapCrop(sender: UIButton) { @@ -434,8 +434,8 @@ public class ImageEditorView: UIView { model: model, textItem: textItem, maxTextWidthPoints: maxTextWidthPoints) - self.delegate?.imageEditor(presentFullScreenOverlay: textEditor, - withNavigation: true) + self.delegate?.imageEditor(presentFullScreenView: textEditor, + isTransparent: false) } // MARK: - Crop Tool @@ -458,8 +458,8 @@ public class ImageEditorView: UIView { } let cropTool = ImageEditorCropViewController(delegate: self, model: model, srcImage: srcImage, previewImage: previewImage) - self.delegate?.imageEditor(presentFullScreenOverlay: cropTool, - withNavigation: true) + self.delegate?.imageEditor(presentFullScreenView: cropTool, + isTransparent: false) }} // MARK: -