Coder Social home page Coder Social logo

yippeeapp / fusuma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ytakzk/fusuma

0.0 3.0 0.0 182 KB

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

License: MIT License

Swift 43.71% Ruby 0.69% Objective-C 42.07% Shell 13.52%

fusuma's Introduction

Fusuma

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

Preview

Images

Features

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

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

github "ytakzk/Fusuma"

Fusuma Usage

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

let fusuma = FusumaViewController()
fusuma.delegate = self
self.presentViewController(fusuma, animated: true, completion: nil)

Delegate methods

// Return the image which is selected from camera roll or is taken via the camera.
func fusumaImageSelected(image: UIImage) {

  print("Image selected")
}

// When camera roll is not authorized, this method is called.
func fusumaCameraRollUnauthorized() {

  print("Camera roll unauthorized")
}

// (Optional) Return the image but called after is dismissed.
func fusumaDismissedWithImage(image: UIImage) {
        
  print("Called just after FusumaViewController is dismissed.")
}

// (Optional) Called when the close button is pressed.
func fusumaClosed() {
     
  print("Called when the close button is pressed")
}

Colors

fusumaTintColor: UIColor // tint color

fusumaBackgroundColor: UIColor // background color

Author

ytakzk
http://ytakzk.me

Donation

Your support is welcome through Bitcoin 16485BTK9EoQUqkMmSecJ9xN6E9nhW8ePd

License

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

fusuma's People

Contributors

ytakzk avatar waterskier2007 avatar ferrick90 avatar korzonek avatar

Watchers

Chew Chit Siang avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.