TPKeyboardAvoiding 技术文档
1. 安装指南
1.1 使用 CocoaPods 安装
如果你使用 CocoaPods 来管理你的 iOS 项目依赖,可以在 Podfile 中添加以下内容:
pod 'TPKeyboardAvoiding'
然后运行以下命令来安装:
pod install
1.2 手动安装
如果你不使用 CocoaPods,可以手动将 TPKeyboardAvoidingTableView.m、TPKeyboardAvoidingTableView.h、TPKeyboardAvoidingScrollView.m 和 TPKeyboardAvoidingScrollView.h 文件添加到你的项目中。
2. 项目的使用说明
2.1 使用 TPKeyboardAvoidingTableView
如果你使用的是 UITableViewController,可以将 UITableView 的类设置为 TPKeyboardAvoidingTableView。具体步骤如下:
- 将
TPKeyboardAvoidingTableView.m和TPKeyboardAvoidingTableView.h文件添加到你的项目中。 - 在 xib 文件中,将
UITableView的类设置为TPKeyboardAvoidingTableView。
2.2 使用 TPKeyboardAvoidingScrollView
如果你使用的是非 UITableViewController,可以将 UIScrollView 的类设置为 TPKeyboardAvoidingScrollView。具体步骤如下:
- 将
TPKeyboardAvoidingScrollView.m和TPKeyboardAvoidingScrollView.h文件添加到你的项目中。 - 在 xib 文件中,添加一个
UIScrollView,并将其类设置为TPKeyboardAvoidingScrollView。 - 将所有需要避免键盘遮挡的控件放置在
TPKeyboardAvoidingScrollView中。
2.3 禁用自动“下一步”按钮功能
如果你不希望自动将键盘上的“下一步”按钮连接到下一个文本字段,可以将 UITextField 的返回键类型设置为除 UIReturnKeyDefault 以外的任何值。
3. 项目API使用文档
3.1 TPKeyboardAvoidingTableView
TPKeyboardAvoidingTableView 是 UITableView 的子类,用于自动调整 UITableView 的内容以避免键盘遮挡正在编辑的文本字段。
3.1.1 属性
- contentInset: 自动调整以避免内容被键盘遮挡。
3.1.2 方法
- adjustOffsetIfNeeded: 调整内容偏移量以确保正在编辑的文本字段可见。
3.2 TPKeyboardAvoidingScrollView
TPKeyboardAvoidingScrollView 是 UIScrollView 的子类,用于自动调整 UIScrollView 的内容以避免键盘遮挡正在编辑的文本字段。
3.2.1 属性
- contentInset: 自动调整以避免内容被键盘遮挡。
3.2.2 方法
- adjustOffsetIfNeeded: 调整内容偏移量以确保正在编辑的文本字段可见。
4. 项目安装方式
4.1 使用 CocoaPods
在 Podfile 中添加以下内容:
pod 'TPKeyboardAvoiding'
然后运行以下命令来安装:
pod install
4.2 手动安装
将 TPKeyboardAvoidingTableView.m、TPKeyboardAvoidingTableView.h、TPKeyboardAvoidingScrollView.m 和 TPKeyboardAvoidingScrollView.h 文件手动添加到你的项目中。
通过以上步骤,你可以轻松地将 TPKeyboardAvoiding 集成到你的 iOS 项目中,并确保在键盘弹出时,文本字段不会被遮挡。
Kimi-K2.5Kimi K2.5 是一款开源的原生多模态智能体模型,它在 Kimi-K2-Base 的基础上,通过对约 15 万亿混合视觉和文本 tokens 进行持续预训练构建而成。该模型将视觉与语言理解、高级智能体能力、即时模式与思考模式,以及对话式与智能体范式无缝融合。Python00
GLM-4.7-FlashGLM-4.7-Flash 是一款 30B-A3B MoE 模型。作为 30B 级别中的佼佼者,GLM-4.7-Flash 为追求性能与效率平衡的轻量化部署提供了全新选择。Jinja00
VLOOKVLOOK™ 是优雅好用的 Typora/Markdown 主题包和增强插件。 VLOOK™ is an elegant and practical THEME PACKAGE × ENHANCEMENT PLUGIN for Typora/Markdown.Less00
PaddleOCR-VL-1.5PaddleOCR-VL-1.5 是 PaddleOCR-VL 的新一代进阶模型,在 OmniDocBench v1.5 上实现了 94.5% 的全新 state-of-the-art 准确率。 为了严格评估模型在真实物理畸变下的鲁棒性——包括扫描伪影、倾斜、扭曲、屏幕拍摄和光照变化——我们提出了 Real5-OmniDocBench 基准测试集。实验结果表明,该增强模型在新构建的基准测试集上达到了 SOTA 性能。此外,我们通过整合印章识别和文本检测识别(text spotting)任务扩展了模型的能力,同时保持 0.9B 的超紧凑 VLM 规模,具备高效率特性。Python00
KuiklyUI基于KMP技术的高性能、全平台开发框架,具备统一代码库、极致易用性和动态灵活性。 Provide a high-performance, full-platform development framework with unified codebase, ultimate ease of use, and dynamic flexibility. 注意:本仓库为Github仓库镜像,PR或Issue请移步至Github发起,感谢支持!Kotlin07
compass-metrics-modelMetrics model project for the OSS CompassPython00