add local files example to READMe

This commit is contained in:
Antoine Barrault 2016-04-13 09:56:53 -03:00
parent 1a05d44f2d
commit c4d04f9ff6
1 changed files with 12 additions and 0 deletions

View File

@ -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.