EFKeyboardToolBar 5.0.0

EFKeyboardToolBar 5.0.0

EyreFree 维护。



EFKeyboardToolBar

CI Status Version License Platform

Swift 的键盘工具栏,灵感来自 KeyboardToolBar.

中文介绍

预览

默认 自定义

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

要求

版本 需要
1.x 需要 Xcode 9.0+
需要 Swift 4.0+
需要 iOS 8.0+
5.x 需要 Xcode 10.2+
需要 Swift 5.0+
需要 iOS 8.0+

安装

EFKeyboardToolBar 通过 CocoaPods 提供使用。要安装它,只需将以下行添加到 Podfile:

pod 'EFKeyboardToolBar'

使用

在你的 AppDelegate.swift

import EFKeyboardToolBar

然后

EFKeyboardToolBar.enableEFKeyboardToolBar()

然后你的 UITextFieldUITextViewUISearchBar 将会在键盘上显示工具栏。

自定义

创建自己的类并实现 EFKeyboardToolBarContentViewProtocol 协议,然后使用以下代码进行设置

let newConfit = EFKeyboardToolBarConfig()
newConfit.toolBarHeight = 60
newConfit.toolBarContentView = EFKeyboardToolBarCustomContentView()
EFKeyboardToolBar.setConfig(config: newConfit)

更多详细信息请查看示例代码。

作者

EyreFree,[email protected]

许可证

EFKeyboardToolBar 可以在 MIT 许可证下获取。更多详情请参阅 LICENSE 文件。