nytimes / NYTPhotoViewer

A modern photo viewing experience for iOS.

Home Page:http://open.blogs.nytimes.com/2015/03/27/a-new-view-for-nytimes-photos/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README Code Snippet Not Working

danlevy1 opened this issue · comments

The following piece of code appears to no longer work:

NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos];
[self presentViewController:photosViewController animated:YES completion:nil];

I am just now upgrading from an older version of NYTPhotoViewer and I use the equivalent piece of Swift code:

var photosViewController = NYTPhotosViewController(photos: photos)
present(photosViewController, animated: true)

It appears that the argument photos: does not exist. Can someone please advise me on how to upgrade my code to the current version?