DDNavText 允许您在 UINavigationBar 标题中轻松显示额外的文本。它还提供了自定义显示和消失的延迟。
DDNavText 是 DD-projects 的一部分(去看看,它们很酷!)
更多的 DD-projects 正在开发中,完成后将添加。
PLEASE NOTE: DDNavText only works if your root view controller is a UINavigationController.
// Show text
[DDNavText showWithText:@"Hello from DDNavText"];
// Show text and automatically hide after 2 seconds
[DDNavText showWithText:@"Hello from DDNavText" dismissWithDelay:2.0];
// Hide text
[DDNavText dismiss];
// Hide text after 2 seconds
[DDNavText dismissWithDelay:2.0];
// Get the current visibility state
BOOL isVisible = [DDNavText isVisible];
要运行示例项目,只需打开 DDNavTextDemo.xcodeproj
并构建和运行。
只需将 DDNavText.h
和 DDNavText.m
复制到您的项目中,并像这样导入 DDNavText.h:
#import "DDNavText.h"
建议使用 CocoaPod 安装方法,因为这样 DDNavText 的副本始终是最新的。
Pauli 'Dids' Jokela,[email protected]和 Didstopia,http://didstopia.com
DDNavText 可在 MIT 许可证下获取。请参阅 LICENSE 文件以获取更多信息。