Skip to content
forked from ytakzk/Fusuma

Instagram-like photo browser, camera, video and filters with a few line of code in Swift.

License

Notifications You must be signed in to change notification settings

damien-nd/YPFusuma

Repository files navigation

YPFusuma

Warning, This is a Fusuma fork and not ready for production (yet!)

Fusuma is a Swift library that provides an Instagram-like photo browser and a camera feature with a few line of code.
You can use Fusuma instead of UIImagePickerController. It also has a feature to take a square-sized photo.

Version Platform CI Status Carthage compatible codebeat badge

Improvements

YPFusuma is built from the great Fusuma library.

Here are the improvements we added :

  • Improve Overall Code Quality
  • Simpler 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)

Preview

Features

  • UIImagePickerController alternative
  • Cropping images in camera roll
  • Taking a square-sized photo and a video using AVFoundation
  • Flash: On Off
  • Camera Mode: Front Back
  • Video Mode

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

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/YPFusuma" to your Cartfile and run carthage update. If unfamiliar with Carthage then checkout their Getting Started section.

github "Yummypets/YPFusuma"

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.showsFilters = false
// picker.startsOnCameraMode = true
// picker.usesFrontCamera = true
// picker.showsVideo = true
picker.didSelectImage = { img in
    // image picked
}
picker.didSelectVideo = { videoURL 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 photo browser, camera, video and filters with a few line of code in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 98.9%
  • Other 1.1%