Skip to content

Instantly share code, notes, and snippets.

@maxchuquimia
Created November 13, 2014 20:52
Show Gist options
  • Save maxchuquimia/4829f8f7283f5b6c74c2 to your computer and use it in GitHub Desktop.
Save maxchuquimia/4829f8f7283f5b6c74c2 to your computer and use it in GitHub Desktop.
Print personal information as a list on a custom keyboard
[self requestSupplementaryLexiconWithCompletion:^(UILexicon *lex){
NSMutableString *s = [NSMutableString new];
for (UILexiconEntry *e in lex.entries)
{
[s appendFormat:@"%@ -> %@\n", e.userInput, e.documentText];
}
dispatch_async(dispatch_get_main_queue(), ^{
UITextView *textView = [[UITextView alloc] initWithFrame:self.view.bounds];
textView.text = s;
[self.view addSubview:textView];
});
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment