Skip to content

kanumuri9593/YPImagePicker

 
 

Repository files navigation

YPImagePicker

YPImagePicker is an instagram-like photo/video picker for iOS written in pure Swift. It comes with adjustable square crop and filters.

Version Platform CI Status Carthage compatible codebeat badge

Features
🌅 Library
📷 Photo
🎥 Video
✂️ Crop
⚡️ Flash
🖼 Filters

Preview

Those features are available just with a few lines of code!

Improvements

YPImagePicker is built from the great Fusuma library.

Here are the improvements we added :

  • Improve Overall Code Quality
  • Simplify API
  • Added Filters View ala Instagram
  • Replaces icons with lighter Text
  • Preselect Front camera (e.g for avatars)
  • Scroll between tabs which feels smoother
  • Grab videos form the library view as well
  • Replaces Delegate based with callbacks based api
  • Uses Native Navigation bar over custom View (gotta be a good UIKit citizen)

Installation

Drop in the Classes folder to your Xcode project.
You can also use CocoaPods or Carthage.

Using CocoaPods

Add pod 'Fusuma' to your Podfile and run pod install. Also add use_frameworks! to the Podfile.

use_frameworks!
pod 'Fusuma'

Using Carthage

Add github "Yummypets/YPImagePicker" to your Cartfile and run carthage update. If unfamiliar with Carthage then checkout their Getting Started section.

github "Yummypets/YPImagePicker"

Usage

Import Fusuma import Fusuma then use the following codes in some function except for viewDidLoad and give FusumaDelegate to the view controller.

let picker = YPImagePicker()
// picker.onlySquareImages = true
// picker.showsFilters = false
// picker.startsOnCameraMode = true
// picker.usesFrontCamera = true
// picker.showsVideo = true
picker.didSelectImage = { img in
    // image picked
}
picker.didSelectVideo = { videoData in
    // video picked
}
present(picker, animated: true, completion: nil)

Original Author

ytakzk
http://ytakzk.me

License

Fusuma is released under the MIT license.
See LICENSE for details.

About

📸 Instagram-like image picker & filters for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 98.9%
  • Other 1.1%