CCKeyboardControl 0.6

CCKeyboardControl 0.6

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2023年11月

Ivan Ziryanov 维护。




  • Ivan Ziryanov

CCKeyboardControl 允许您轻松启用交互式键盘放电。它还提供了添加键盘依赖动画的简单方法。

安装

CocoaPods 是向您的项目添加 CCKeyboardControl 的推荐方式。

以下是一个安装 CCKeyboardControl 的示例 podfile

Podfile

platform :ios, '6.0'

pod 'CCKeyboardControl'

用法

示例项目包含 (CCKeyboardControlExample)

添加“拖动以删除”(在 iMessages 中引入的功能)

__weak typeof(self) wself = self;
[self.view addKeyboardPanningWithFrameBasedActionHandler:^(CGRect keyboardFrameInView, CCKeyboardControlState keyboardState) {
    if (keyboardState != CCKeyboardControlStatePanning)
        [wself updateTableViewInsetWithKeyboardFrame:keyboardFrameInView];
} constraintBasedActionHandler:^(CGRect keyboardFrameInView, CCKeyboardControlState keyboardState) {
    wself.bottomPanelBottomConstraint.constant = wself.view.height - keyboardFrameInView.origin.y;
}];

注意

第一次出现时的键盘延迟

标准的 iOS 问题。使用 Brandon William 的 UIResponder 类别在首次使用之前缓存键盘。

自动引用计数 (ARC) 支持

CCKeyboardControl 默认启用 ARC。