close
当前位置: 物联网在线 > 技术文库 > ios >

iOS开源 - 一款完整的文件资源管理器组件

FileExplorer (iOS 10.0+)

:construction_worker: Project created and maintained by Rafał Augustyniak . 

Introduction

iOS开源 - 一款完整的文件资源管理器组件

FileExplorer is a control designed to provide an easy way to browse and interact with local file system on iOS devices. It works as file browser with additional possibility of deleting specified files and/or directories and possibility to choose files and/or directories.

  Main Features
:point_right:   Possibility to choose files or/and directories if there is a need for that  
��   Possiblity to remove files or/and directories if there is a need for that  
:mag:   Built-in search functionality  
:books:   Documented  
:house:   Out of the box support for image, audio, video and pdf files  
:rocket:   Extendable API; Possibility to add support for any file type  
:bird:   Written in Swift  
Images Audio Files Videos Directories PDFs Preview

iOS开源 - 一款完整的文件资源管理器组件

 

iOS开源 - 一款完整的文件资源管理器组件

 

iOS开源 - 一款完整的文件资源管理器组件

 

iOS开源 - 一款完整的文件资源管理器组件

 

iOS开源 - 一款完整的文件资源管理器组件

 

iOS开源 - 一款完整的文件资源管理器组件

 
Table of Contents:

Installation

Basic Usage

Customizations

Deciding Which Files and/or Directories Should Be Visible

Using FileExplorer as a Way to Choose Files and/or Directories

Deciding Whether User Can Delete Files and/or Directories

Adding Support for Additional File Types

Documentation

Installation CocoaPods

CocoaPods is the recommended way to add FileExplorer to your project.

Add additional entry to your Podfile.

pod "FileExplorer", "~> 1.0.2"

Install Pod(s) running pod install command.

Include FileExplorer using import FileExplorer .

Source files

Downloaded the latest version of the library usinglink.

Copy content of the downloaded (and unzipped) zip file into your project by dragging it into Project's navigator files structure.

Basic Usage

Check out the demo for example usage of library. Make sure you read the FileExplorer documentation on Cocoa Docs .

Basics

Add following import in file of your project when you want to use RATreeView:

import FileExplorer

Simplest way to present File Explorer:

let fileExplorer = FileExplorerViewController() self.present(fileExplorer, animated: true, completion: nil)

Customizations

FileExplorer allows for a lot of customizations. Some of them are discussed below.

Deciding Which Files and/or Directories Should Be Visible

FileExplorerViewController has filters ( fileFilters and ignoredFileFilters properties) which can be used to select which files or directories should or shouldn't be displayed to the user.

Specify which files should be visible to the user:

let fileExplorer = FileExplorerViewController() //Only files with `txt` and `jpg` extensions will be visible fileExplorer.fileFilters = [Filter.extension("txt"), Filter.extension("jpg")] self.present(fileExplorer, animated: true, completion: nil)

Specify which files should not be visible to the user:

let fileExplorer = FileExplorerViewController() //Everything but directories will be visible fileExplorer.ignoredFileFilters = [Filter.type(.directory)] self.present(fileExplorer, animated: true, completion: nil)

Combining both types of filters:

let fileExplorer = FileExplorerViewController() //Only files with `.txt` extension that were modified prior to `referenceDate` will be visible fileExplorer.fileFilters = [Filter.extension("txt")] fileExplorer.ignoredFileFilters = [Filter.Filter.modificationDatePastOrEqualTo(referenceDate)] self.present(fileExplorer, animated: true, completion: nil) Using FileExplorer as a Way to Choose Files and/or Directories

Configure FileExplorer so that user is allowed to choose files and/or directories:

let fileExplorer = FileExplorerViewController() fileExplorer.canChooseFiles = true //specify whether user is allowed to choose files fileExplorer.canChooseDirectories = false //specify whether user is allowed to choose directories fileExplorer.allowsMultipleSelection = true //specify whether user is allowed to choose multiple files and/or directories fileExplorer.delegate = self self.present(fileExplorer, animated: true, completion: nil)
(责任编辑:ioter)

用户喜欢...

iOS开源:WJClipsButton-Clips 按钮的完整实现

效果 要求 Swift 3.0 iOS 8.0 Xcode 8.0 安装 WJClipsButton is available through CocoaPods . To install it, simply add the following line to your Podfile: pod "WJClipsButton" 使用 Code Import import WJClipsButton Init Setup let wjButton = WJCl...


WCDB:微信开源的高效、完整、易用的移动数据库框架

WCDB是一个高效、完整、易用的移动数据库框架,基于 SQLCipher ,支持iOS, macOS和Android。 WCDB for iOS/macOS 基本功能 WINQ (WCDB语言集成查询): 通过WINQ,开发者无须为了拼接SQL的字符串而写一大坨胶...


33 款主宰 2017 iOS 开发的开源库

你好, iOS 开发者们 !我的名字是 Pawel,是一名 iOS 独立开发者,也是 Enter Universe 的作者。 大概在两年前,我发布了 。这篇文章是我的一个最佳纪录(用户好评数): 因为有 15.5万人 关注过...


iOS开源:CBPic2ker - 图片选择,不但酷而且美还支持人脸识别

效果 特性 酷 给你丝滑的美 人脸识别 版本要求 iOS 8.0 安装 CBPic2ker 已经支持了CocoaPods. 只要在你的 Podfile 文件中添加下面的语句即可: pod "CBPic2ker" 不要忘记在info.plist文件中添加描述: 使用...


iOS开源:iOSPalette-图片精确提取主色调算法

Objective-C版本的Google Palette算法在Java.A工具中提取了一个图像的主要颜色。与传统的算法相比,iOSPalette可以帮助您提取更有可能成为“主色”的主色。它不是 总是像素数中最大的。 2.Why iOS-...


IOS开源:HHBadgeHUD-一款更 Q 的通知图标控件(OC)

一款更Q的通知图标控件。 演示项目 查看并运行 HHBadgeHUDDemo/HHBadgeHUDDemo.xcodeproj 特性 无侵入性 : 轻量 : 易扩展 : 使用方法 ###数字图标样式 // 1. 给UIView添加通知图标self.oneView.hh_badge = [HHCountB...


iOS开源:UILabel-可设置字间距,行间距等

屏幕快照 2016-04-14 下午9.58.53.png 实现的功能: 简单的利用Runtime给UILabel添加了属性 字间距 行间距 设置下划线 设置关键字 自适应宽高 详细用法请查看Demo...


iOS开源-轻量级 JSON 转 Model 框架,使用链式编程,无侵入

SuperKVC is a light-weight injection framework to convert JSON to Model. SuperKVC has its own config DSL which provides a chainable way of describing your injection config concise and readable. SuperKVC supports iOS and macOS. Samples are at the Su...


iOS开源:Magnetic - 可定制地类似 Apple Music 磁力吸引式泡泡选择器组件

Magneticis a customizable bubble picker like the Apple Music genre selection. $ pod try Magnetic 要求 iOS 9.3+ Xcode 8.0+ Swift 3.0+ 使用 A Magnetic object is an SKScene . To display, you present it from an SKView object. import Magneticclass V...


iOS开源:AAChartKit -一款极其精美的 iOS 开源图表库

AAChartKit项目,是在流行的开源前端图表库 Highcharts 的基础上,封装的面向对象的,一组简单易用,极其精美的图表绘制控件. 适配 iOS 8, 支持ARC,支持 OC语言,配置简单. 功能强大,支持柱状图 条形图...