 import CoreImage
 
 /// The default view controller responsible for editing an image.
-public final class EditImageViewController: UIViewController, UIGestureRecognizerDelegate {
+open class EditImageViewController: UIViewController, UIGestureRecognizerDelegate {
     private static let TextViewEditingBarAnimationDuration = 0.25
     
     // MARK: - Editor

        setupConstraints()
    }
    
    public override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        navigationController?.hidesBarsOnTap = true
        navigationController?.setNavigationBarHidden(true, animated: false)
    }
    
    public override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        navigationController?.setNavigationBarHidden(false, animated: true)
    }
    
    public override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        navigationController?.hidesBarsOnTap = true
    }
    
    public override func viewDidLayoutSubviews() {
        if let height = navigationController?.navigationBar.frame.height {
            var rect = annotationsView.frame
            rect.origin.y += height

        }
    }
    
    open override var prefersStatusBarHidden: Bool {
        return true
    }
    
    open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
        setNeedsStatusBarAppearanceUpdate()
    }
    
    open override var shouldAutorotate: Bool {
        return false
    }
    
    open override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        return imageIsLandscape() ? .landscape : [.portrait, .portraitUpsideDown]
    }
    
    open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
        var landscapeOrientation = UIInterfaceOrientation.landscapeRight
        var portraitOrientation = UIInterfaceOrientation.portrait
        
