KTSecretTextView 0.0.1

KTSecretTextView 0.0.1

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

Kenny Tang 维护。




  • Kenny Tang

KTSecretTextView 试图重新创建 Secret 应用中的文本视图。它聪明的设计以及大量的使用手势使得用户可以非常直观地使用质感背景或照片来自定义他们的秘密文本。


安装

将以下内容添加到 Podfile 以使用 KTSecretTextView

pod 'KTSecretTextView', '~> 0.0.1'

使用

KTSecretViewController 类是一个包装器,您可以将其呈现或推送到视图控制器堆栈中。提供的示例应用简单地将其作为一个模态对话框呈现,如下所示。

在 Imports 中添加 KTSecretViewController

 #import "KTSecretViewController.h"

在按钮点击时呈现视图控制器

KTSecretViewController *secretVC = self.secretViewController;

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:secretVC];

[self presentViewController:navigationController animated:YES completion:nil];

要捕获 KTSecretTextView 的输出,提交一个代理

@interface KTSecretTextViewSampleViewController ()<
KTSecretViewControllerDelegate
>

并实现代理方法,该方法提供包含编辑后的背景和文本、实际的富文本字符串和处理的背景图像的便捷快照视图。您可以从快照视图中创建 UIImage 并按需保存它。

- (void)secretViewController:(KTSecretViewController*)vc secretViewSnapshot:(UIView*)snapshotView backgroundImage:(UIImage*)backgroundImage attributedString:(NSAttributedString*)attributedString

背景


致谢

以下 Pods 得到使用


许可证

KTSecretTextView 在 MIT 许可证下可用。


反馈

提交一个问题或拉取请求。或者通过 @kenshin03 联系我。