KTSecretTextView 0.0.1

KTSecretTextView 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Kenny Tang.




  • By
  • Kenny Tang

KTSecretTextView is an attempt to re-create the text view in the app Secret. Its clever designs and heavy use of gestures makes it very intuitive for users to customize their secret texts with textured backgrounds or photos.


Installation

Add this to your Podfile to use KTSecretTextView:

pod 'KTSecretTextView', '~> 0.0.1'

Usage

TheKTSecretViewController class is a wrapper you can present or push to your view controller stack. The provided sample app simply presents it as a modal as shown below.

Adding KTSecretViewController to imports:

 #import "KTSecretViewController.h"

Presenting the view controller on the tap of a button:

KTSecretViewController *secretVC = self.secretViewController;

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

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

To capture outputs from KTSecretTextView, vend for a delegate:

@interface KTSecretTextViewSampleViewController ()<
KTSecretViewControllerDelegate
>

And implement the delegate method which provides a convenient snapshot view containing the edited background and text, as well as the actual attributed string and processed background image. You can make a UIImage from the snapshot view and save it as needed.

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

Background


Credits

The following Pods are used:


License

KTSecretTextView is available under the MIT license.


Feedback

File an issue or pull request. Or ping me at @kenshin03.