Skip to content
项目

关于

Kanvas:适用于 iOS 的创作工具。

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文
kanvy

Kanvas

Build status

Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

It is used in the Tumblr iOS app as a camera, media editor, GIF maker, and media posting tool.

Setup

Add Kanvas as a Swift Package dependency:

dependencies: [
    .package(url: "https://github.com/tumblr/kanvas-ios.git", from: "1.6.2")
]

Or in Xcode: File → Add Package Dependencies… and enter the repository URL.

Usage

Kanvas is mainly two parts: the Camera, and the Editor. Both are just view controllers that you present, and have settings and delegates that help you customize their behavior.

To show the camera:

let settings = CameraSettings()
let camera = CameraController(settings: settings)
present(camera, animated: true)

And to edit existing media, like a video:

let videoURL = URL(string: "path/to/video.mov")
let settings = CameraSettings()
let editor = EditorViewController.createEditor(for: videoURL, settings: settings)
present(editor, animated: true)

Each view controller accepts a CameraSettings object, which provides fine-grained settings and feature togges. Each view controller also has a delegate property for providing your own handlers to creating media, performing editing operations, logging, or really anything else Kanvas can do.

Documentation is lacking at the moment, but contributions are welcome!

Example App

ExampleSPM is an example app showing how to use Kanvas. Try it out!

  1. Open ExampleSPM/KanvasExample.xcodeproj in Xcode
  2. Run the app on a device or simulator.

探索相关项目

加载中…