mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
71 lines
2.7 KiB
Markdown
71 lines
2.7 KiB
Markdown
# BSImagePicker
|
|
[](https://travis-ci.org/mikaoj/BSImagePicker)
|
|
[](http://cocoapods.org/pods/BSImagePicker)
|
|
[](http://cocoapods.org/pods/BSImagePicker)
|
|
[](http://cocoapods.org/pods/BSImagePicker)
|
|
[](https://github.com/Carthage/Carthage)
|
|
|
|

|
|
|
|
A mix between the native iOS 8 gallery and facebooks image picker. It is intended as a replacement for UIImagePickerController for both selecting and taking photos.
|
|
|
|
## Usage
|
|
|
|
To run the example project, clone the repo, and run `pod install` from the Example directory first.<br />
|
|
To use it in you own project
|
|
###### Swift
|
|
```swift
|
|
let vc = BSImagePickerViewController()
|
|
|
|
bs_presentImagePickerController(vc, animated: true,
|
|
select: { (asset: PHAsset) -> Void in
|
|
// User selected an asset.
|
|
// Do something with it, start upload perhaps?
|
|
}, deselect: { (asset: PHAsset) -> Void in
|
|
// User deselected an assets.
|
|
// Do something, cancel upload?
|
|
}, cancel: { (assets: [PHAsset]) -> Void in
|
|
// User cancelled. And this where the assets currently selected.
|
|
}, finish: { (assets: [PHAsset]) -> Void in
|
|
// User finished with these assets
|
|
}, completion: nil)
|
|
```
|
|
## Features
|
|
* Multiple selection.
|
|
* Fullscreen preview
|
|
* Switch albums.
|
|
* No localization needed (uses icons or system localizations).
|
|
* Take photos (it isn't enabled by default, so set takePhotos to true if you want it).
|
|
* Customizable - check out BSImagePickerSettings to see what you can tweak.
|
|
|
|
## Customization
|
|
|
|
You have access to the cancel, album and done button. Customize them as you would with any other UIBarButtonItem (cancel & finish) or UIButton (album).<br />
|
|
There are also a few other settings you can tweak. They are documented in BSImagePickerSettings.<br />
|
|
[Documentation @ cocoadocs](http://cocoadocs.org/docsets/BSImagePicker/)
|
|
|
|
## Custom fetch results
|
|
|
|
Not happy with the fetch results (camera roll and albums) that BSImagePicker uses as default? Set the fetchResults property.
|
|
|
|
## Requirements
|
|
|
|
iOS 8
|
|
|
|
## Installation
|
|
|
|
BSImagePicker is available through [CocoaPods](http://cocoapods.org). To install
|
|
it, simply add the following line to your Podfile:
|
|
|
|
```ruby
|
|
pod "BSImagePicker", "~> 2.3"
|
|
```
|
|
|
|
## Author
|
|
|
|
Joakim Gyllström, joakim@backslashed.se
|
|
|
|
## License
|
|
|
|
BSImagePicker is available under the MIT license. See the LICENSE file for more info.
|