Need help with Fusuma?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ytakzk
2.4K Stars 367 Forks MIT License 346 Commits 25 Opened issues

Description

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

Services available

!
?

Need anything else?

Contributors list

# 24,098
Swift
Objecti...
carthag...
instagr...
115 commits
# 81,518
Swift
instagr...
carthag...
cocoapo...
14 commits
# 87,885
Swift
Objecti...
instagr...
carthag...
13 commits
# 39,584
Objecti...
Swift
carthag...
instagr...
10 commits
# 110,917
Swift
Objecti...
instagr...
carthag...
8 commits
# 29,252
Swift
Objecti...
imagevi...
objecti...
7 commits
# 124,414
Swift
instagr...
carthag...
cocoapo...
5 commits
# 119,281
Swift
instagr...
carthag...
cocoapo...
5 commits
# 151,069
Swift
Objecti...
instagr...
carthag...
4 commits
# 153,554
Swift
instagr...
carthag...
cocoapo...
3 commits
# 170,098
Swift
Objecti...
instagr...
carthag...
3 commits
# 134,268
Swift
instagr...
carthag...
photo-b...
3 commits
# 164,541
Swift
instagr...
carthag...
cocoapo...
2 commits
# 199,422
Swift
Objecti...
instagr...
carthag...
2 commits
# 7,301
Swift
Objecti...
maxmind
alfred
2 commits
# 194,921
Swift
Objecti...
instagr...
carthag...
2 commits
# 174,276
Swift
Objecti...
instagr...
carthag...
2 commits
# 176,582
Swift
Objecti...
instagr...
carthag...
1 commit
# 254,262
Swift
Objecti...
instagr...
carthag...
1 commit
# 254,859
Swift
Objecti...
instagr...
carthag...
1 commit

NOTE: This project is no longer maintained.

We highly recommend YPImagePicker.

Fusuma

Fusuma is a Swift library that provides an Instagram-like photo browser with a camera feature using only a few lines 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

  • [x] UIImagePickerController alternative
  • [x] Cropping images in camera roll
  • [x] Taking a square-sized photo and a video using AVFoundation
  • [x] Flash: On & Off
  • [x] Camera Mode: Front & Back
  • [x] Video Mode
  • [x] Colors fully customizable

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

Installation

Manual installation

Download and drop the 'Classes' folder into your Xcode project.

Using CocoaPods

Add

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

Swift 3

The latest version does support Swift 4.2. If you're still using Swift 3, you can install Fusuma as follows:

pod 'Fusuma', git: '[email protected]:ytakzk/Fusuma.git', branch: 'swift-3'

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
fusuma.availableModes = [FusumaMode.library, FusumaMode.camera, FusumaMode.video] // Add .video capturing mode to the default .library and .camera modes
fusuma.cropHeightRatio = 0.6 // Height-to-width ratio. The default value is 1, which means a squared-size photo.
fusuma.allowMultipleSelection = true // You can select multiple photos from the camera roll. The default value is false.
self.present(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, source: FusumaMode) {

print("Image selected") }

// Return the image but called after is dismissed. func fusumaDismissedWithImage(image: UIImage, source: FusumaMode) {

print("Called just after FusumaViewController is dismissed.") }

func fusumaVideoCompleted(withFileURL fileURL: URL) {

print("Called just after a video has been selected.") }

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

print("Camera roll unauthorized") }

// Return selected images when you allow to select multiple photos. func fusumaMultipleImageSelected(_ images: [UIImage], source: FusumaMode) {

}

// Return an image and the detailed information. func fusumaImageSelected(_ image: UIImage, source: FusumaMode, metaData: ImageMetadata) {

}

How To Customize

let fusuma = FusumaViewController()
fusuma.delegate = self
// ...
fusumaCameraRollTitle = "CustomizeCameraRollTitle"
fusumaCameraTitle = "CustomizeCameraTitle" // Camera Title
fusumaTintColor: UIColor // tint color
// ...
self.present(fusuma, animated: true, completion: nil)

Properties

| Prop | Type | Description | Default | |---|---|---|---| |

fusumaBaseTintColor
|UIColor|Base tint color.|

UIColor.hex("#c9c7c8", alpha: 1.0)
| |
fusumaTintColor
|UIColor|Tint color.|
UIColor.hex("#FCFCFC", alpha: 1.0)
| |
fusumaBackgroundColor
|UIColor|Background color.|
UIColor.hex("#c9c7c8", alpha: 1.0)
| |
fusumaCheckImage
| UIImage | Image of check button.|| |
fusumaCloseImage
| UIImage |Image of close button.|| |
fusumaCropImage
| Bool |Whether to crop the taken image.|
true
| |
fusumaSavesImage
| Bool |Whether to save the taken image.|
false
| |
fusumaCameraRollTitle
| String |Text of camera roll title.|
"Library"
| |
fusumaCameraTitle
| String |Text of carmera title text.|
Photo
| |
fusumaVideoTitle
| String |Text of video title.|
Video
| |
fusumaTitleFont
| UIFont |Font for title text.|
UIFont(name: "AvenirNext-DemiBold", size: 15)
|

Fusuma for Xamarin

Cheesebaron developed Chafu for Xamarin.
https://github.com/Cheesebaron/Chafu

Author

ytakzk
https://ytakzk.me

Donation

Your support is welcome through Bitcoin 3Ps8tBgz4qn6zVUr5D1wcYrrzYjMgEugqv

License

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.