     super.viewDidLoad()
     
     dataSource = self
+    delegate = self
     
     automaticallyAdjustsScrollViewInsets = false
     

  }
  
  //this just feels dirty but using till I figure out a better way
  public static func show(from: UIViewController, images:[UIImage], startIndex:Int, fullScreen:Bool, spacing: Int = 8) -> ImageViewer {
    let spacingStr = String(spacing)
    
    let imageViewer = ImageViewer(images: images,

  override public func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    
    let shareButton = UIBarButtonItem.init(barButtonSystemItem: .action, target: self, action: #selector(share))
    self.setToolbarItems([shareButton], animated: true)
    
    
    if let nav = navigationController {
      
      nav.hidesBarsOnTap = true
      nav.isNavigationBarHidden = false
      nav.isToolbarHidden = !showToolBar
    }
  }
    
  func share() {
    let image = images[currentIndex]
        
    let controller = UIActivityViewController.init(activityItems: [image, shareMessage], applicationActivities: nil)
    present(controller, animated: true, completion: nil)
  }
  
  
  func handleSingleTap(gesture: UITapGestureRecognizer) {
    if let nav = navigationController {
        let hideFlag = !nav.isNavigationBarHidden
      setToolbarVisibilty(hidden: hideFlag)
    }
    
