change README

This commit is contained in:
KazukiTanaka 2017-05-02 17:17:40 +09:00
parent 0e98d5acfb
commit 4536b5a2d9
1 changed files with 12 additions and 6 deletions

View File

@ -11,15 +11,20 @@ NohanaImagePicker enables your app to pick images from multiple album, and the m
## Usage
```swift
import UIKit
import Photos
import NohanaImagePicker
class ViewController: UIViewController, NohanaImagePickerControllerDelegate {
class MyViewController: UIViewController {
let picker = NohanaImagePickerController()
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(true)
let picker = NohanaImagePickerController()
picker.delegate = self
present(picker, animated: true, completion: nil)
super.viewDidAppear(animated)
self.picker.delegate = self
present(self.picker, animated: true, completion: nil)
}
}
extension MyViewController: NohanaImagePickerControllerDelegate {
func nohanaImagePickerDidCancel(_ picker: NohanaImagePickerController) {
print("🐷Canceled🙅")
@ -30,7 +35,6 @@ class ViewController: UIViewController, NohanaImagePickerControllerDelegate {
print("🐷Completed🙆\n\tpickedAssets = \(pickedAssts)")
picker.dismiss(animated: true, completion: nil)
}
}
```
@ -84,6 +88,8 @@ Use [Carthage](https://github.com/Carthage/Carthage).
Use [CocoaPods](https://cocoapods.org/).
- Try; ``pod try NohanaImagePicker``
- Add the followings to your Podfile:
```ruby