Last active
August 29, 2015 14:07
-
-
Save austinzheng/45b7e28ee3614e7dd7a5 to your computer and use it in GitHub Desktop.
Mentions plug-in setup example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set up mentions plug-in | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
HKWMentionsChooserPositionMode mode = HKWMentionsChooserPositionModeEnclosedTop; | |
NSCharacterSet *controlCharacters = [NSCharacterSet characterSetWithCharactersInString:@"@+"]; | |
HKWMentionsPlugin *mentionsPlugin = [HKWMentionsPlugin mentionsPluginWithChooserMode:mode | |
controlCharacters:controlCharacters | |
searchLength:3]; | |
self.plugin = mentionsPlugin; | |
mentionsPlugin.delegate = [MentionsManager sharedInstance]; | |
self.textView.controlFlowPlugin = mentionsPlugin; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment