Bureau - 一个容器,用于在 UIKit 的 InputView 上显示您的自定义视图

一种在 UIKit 的输入视图上显示自定义视图的简单方法。

重要的是,它支持 iPadOS 上的浮动键盘

要求

使用方法

class ViewController: UIViewController {

  // 💡 Step.1 Put BureauController
  private let bureauController = BureauController()

  override func viewDidLoad() {
    super.viewDidLoad()

    // 💡 Step.2 Set the viewController as an owner.
    bureauController.setOwner(viewController: self)

    // 💡 Step.3 Create an instance of your custom input view.
    let yourCustomInputView = ...

    // 💡 Step.4 To display your input view, do followings.
    bureauController.containerView.addSubviewToEdges(view: yourCustomInputView)

    // 💡 Step.5 Finally, Let's try to show it.
    bureauController.show()

  }
}

安装

目前,仅支持 CocoaPods。

在 Podfile 中,请添加以下内容。

pod 'Bureau'

作者

Hiroshi Kimura

许可

MIT