From c4d04f9ff68e0bc49fc02c45e1be8ff39437c47c Mon Sep 17 00:00:00 2001 From: Antoine Barrault Date: Wed, 13 Apr 2016 09:56:53 -0300 Subject: [PATCH] add local files example to READMe --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 4738477..780dcf5 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,18 @@ let browser = SKPhotoBrowser(photos: images) presentViewController(browser, animated: true, completion: {}) ``` +from local files: +```swift +// images from local files +var images = [SKLocalPhoto]() +let photo = SKLocalPhoto.photoWithImageURL("..some_local_path/150x150.png") +images.append(photo) + +// create PhotoBrowser Instance, and present. +let browser = SKPhotoBrowser(photos: images) +presentViewController(browser, animated: true, completion: {}) +``` + If you want to use zooming effect from an existing view, use another initializer: ```swift // e.g.: some tableView or collectionView.