Skip to content
A photo browser and camera library for Xamarin.iOS
Branch: master
Clone or download
Pull request Compare This branch is 4 commits behind BruelAndKjaer:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Continuous Integration

Build Server Platform Build Status
AppVeyor Windows AppVeyor Build status
Bitrise macOS Bitrise
VSTS Windows Visual Studio Team services
MyGet Windows chafu MyGet Build Status




Chafu is a photo browser and camera library for Xamarin.iOS. It is heavily inspired from Fusuma, which is a Swift library written by ytakzk.

It has been tweaked for ease of use in a C# environment, all xibs converted to C# code and unnecessary wrapper views have been removed. The library has been simplified and loads of unfixed Fusuma bugs and features have been fixed in this library.



  • UIImagePickerController alternative
  • Camera roll (images and video)
  • Album view to show images and video from folder
  • Camera for capturing both photos and video
  • Cropping of photos into squares
  • Toggling of flash when capturing photos and video
  • Supports front and back cameras
  • Face detection
  • Customizable


Install from NuGet

Install-Package Chafu

Note: iOS 10 requires the developer to provide usage descriptions in the info.plist. Otherwise, the application will crash, when requesting permissions to camera, photo library or microphone.

<string>Describe what photo library is used for</string>
<string>Describe what camera is used for</string>
<string>Describe what microphone is used for</string>


Add a using chafu; in the top of your class.

var chafu = new ChafuViewController();
chafu.HasVideo = true; // add video tab
chafu.MediaTypes = MediaType.Image | MediaType.Video // customize what to show
PresentViewController(chafu, true);

or if you only want to show gallery:

var gallery = new AlbumViewController();
gallery.MediaTypes = MediaType.Image | MediaType.Video // customize what to show
PresentViewController(gallery, true);

Both accept custom data source which will be instantiated lazily:

var chafu = new AlbumViewController {
    LazyDataSource = (view, size, mediaTypes) => 
        new LocalFilesDataSource(view, size, mediaTypes) {ImagesPath = path},
    LazyDelegate = (view, source) => new LocalFilesDelegate(view, (LocalFilesDataSource) source),

where path is a directory the App has access to.


// When image is selected or captured with camera
chafu.ImageSelected += (sender, image) => imageView.Image = image;

// When video is captured with camera
chafu.VideoSelected += (sender, videoUrl) => urlLabel.Text = videoUrl.AbsoluteString;

// When ViewController is dismissed
chafu.Closed += (sender, e) => { /* do stuff on closed */ };

// When permissions to access camera roll are denied by the user
chafu.CameraRollUnauthorized += (s, e) => { /* do stuff when Camera Roll is unauthorized */ };

// when permissions to access camera are denied by the user
chafu.CameraUnauthorized += (s, e) => { /* do stuff when Camera is unauthorized */ };


All customization happens through the static Configuration class.

Configuration.BaseTintColor = UIColor.White;
Configuration.TintColor = UIColor.Red;
Configuration.BackgroundColor = UIColor.Cyan;
Configuration.CropImage = false;
Configuration.TintIcons = true;
// etc...

Explore the class for more configuration.

Thanks to

Many thanks to ytakzk for his initial Fusuma implementation, which this library started as.

What does Chafu mean?

Fusuma means bran in Japanese, Chafu in Japanese means chaff. Chaff is sometimes confused with bran.


Chafu is licensed under the MIT License, see the LICENSE file for more information.

You can’t perform that action at this time.