NYTPhotoViewer icon indicating copy to clipboard operation
NYTPhotoViewer copied to clipboard

Cannot swipe between images

Open hughbe opened this issue 7 years ago • 5 comments

If I provide

let dataSource = NYTPhotoViewerArrayDataSource(photos: photos)
let photosViewController = NYTPhotosViewController(dataSource: dataSource, initialPhotoIndex: 0, delegate: nil)

I cannot swipe between photos, as there is only one view controller in the created view controller. I would expect to be able to swipe to change photos if there are more than one

hughbe avatar Feb 11 '18 12:02 hughbe

same issue, did you make any headway?

KwanAtFoursquare avatar Apr 10 '18 14:04 KwanAtFoursquare

Me too, has any solution?

AlexHrom avatar Apr 16 '18 11:04 AlexHrom

@hughbe @KwanAtFoursquare @AlexHrom

Make sure you have a strong reference to the view controller. it may happen if you only do

let controller = NYTPhotosViewController(...) self.present(controller ...)

try have an instance variable that

self.presented = controller

odaeagle avatar Jun 08 '18 16:06 odaeagle

@odaeagle not helped

youmee avatar Jun 10 '18 11:06 youmee

Try to use strong reference for the Data Source.

algenepulido avatar Jun 21 '18 08:06 algenepulido