Hello sir, when i use code like bottom to browser ,it doesn't show image and swipegesture doesn't work. so it's must have a delegate?
func showPhotoBrowser(photos: [Any], atIndex: Int, viewController: UIViewController) {
var tempArray = [Media]()
for i in photos{
if i is UIImage{
let photo = Media(image: i as! UIImage)
tempArray .append(photo)
}
if i is String{
let photo = Media(url: i as! URL)
tempArray .append(photo)
}
}
let browser = MediaBrowser(media: tempArray)
browser.setCurrentIndex(at: atIndex)
let nc = UINavigationController.init(rootViewController: browser)
nc.modalTransitionStyle = .crossDissolve
viewController.present(nc, animated: true, completion: nil)
}
Hello sir, when i use code like bottom to browser ,it doesn't show image and swipegesture doesn't work. so it's must have a delegate?