2017-07-23 12:48:11 +02:00
2017-07-23 12:48:11 +02:00
2017-07-23 12:48:11 +02:00
2016-09-19 14:24:33 +02:00
2017-07-23 12:48:11 +02:00
2016-09-19 14:24:33 +02:00
2016-09-19 14:24:33 +02:00
2016-09-19 14:42:51 +02:00
2016-02-16 23:42:49 +01:00
2017-07-21 10:23:36 -04:00
2016-02-07 14:40:58 +01:00
2017-06-18 08:40:35 +08:00

FileBrowser - iOS Finder-style file browser in Swift

Build Status Version Carthage compatible

FileBrowser

iOS Finder-style file browser in Swift with search, file previews and 3D touch. Simple and quick to use.

Features

Features
📱 Browse and select files and folders with a familiar UI on iOS.
🔍 Pull down to search.
👓 Preview most file types. Including plist and json.
👆 3D touch support for faster previews with Peek & Pop.
💮 Fully customizable.

Usage

Import FileBrowser at the top of the Swift file.

import FileBrowser

To show the file browser, all you need to do is:

let fileBrowser = FileBrowser()
present(fileBrowser, animated: true, completion: nil)

By default, the file browser will open in your app's documents directory. When users select a file, a preview will be displayed - offering an action sheet of options based on the file type.

Advanced Usage

You can open FileBrowser in a different root folder by initialising with an NSURL file path of your choice.

let fileBrowser = FileBrowser(initialPath: customPath)

Use the didSelectFile closure to change FileBrowser's behaviour when a file is selected.

fileBrowser.didSelectFile = { (file: FBFile) -> Void in
    print(file.displayName)
}

To exclude a certain file type or a specific file path:

fileBrowser.excludesFileExtensions = ["zip"]
fileBrowser.excludesFilepaths = [secretFile]

Setting up with CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
pod 'FileBrowser', '~> 0.2'

Setting up with Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate FileBrowser into your Xcode project using Carthage, specify it in your Cartfile:

github "marmelroy/FileBrowser"
S
Description
Finder-style iOS file browser written in Swift
Readme MIT 16 MiB
Languages
Swift 89.4%
Ruby 5.3%
Shell 3.6%
Objective-C 1.7%