     }
 }
 
+extension DemoViewController: DKPhotoGalleryDelegate {
+    func photoGallery(_ gallery: DKPhotoGallery, didShow index: Int) {
+        if let titleLabel = gallery.footerView as? UILabel {
+            if let title = gallery.items?[index].title {
+                titleLabel.text = title
+            } else {
+                titleLabel.text = nil
+            }
+        }
+    }
+}

        DKPhotoGalleryItem(image: #imageLiteral(resourceName: "Image2"), title: "Second"),
        DKPhotoGalleryItem(image: #imageLiteral(resourceName: "Image3"), title: "Third"),
        DKPhotoGalleryItem(videoURL: URL(string: "http://192.168.0.2/screenview/7-13.mp4")!),
        DKPhotoGalleryItem(pdfURL: URL(string: "http://104.131.3.97/storage/workshops/bids_images/5b38ff8999b362018-07-01-16-21-29.pdf")!),
        DKPhotoGalleryItem(image: #imageLiteral(resourceName: "Image4")),
        DKPhotoGalleryItem(image: #imageLiteral(resourceName: "Website")),
        DKPhotoGalleryItem(image: #imageLiteral(resourceName: "Text")),

                cell.contentLabel.text = imageURL.absoluteString
            } else if let videoURL = item.videoURL {
                cell.contentLabel.text = videoURL.absoluteString
            } else if let pdfURL = item.pdfURL {
                cell.contentLabel.text = pdfURL.absoluteString
            }
        }
        
