Skip to content

Instantly share code, notes, and snippets.

@ytyubox
Last active May 3, 2019 17:32
Show Gist options
  • Save ytyubox/976de6bd2f653bab8914940dd41d12c2 to your computer and use it in GitHub Desktop.
Save ytyubox/976de6bd2f653bab8914940dd41d12c2 to your computer and use it in GitHub Desktop.
UITextDocumentProxy Detail

documentContextBeforeInput & documentContextAfterInput

The Document is auto recognized for Sentence like String.

-- Cursor postion --⇣ 
A Random text. B Ran🙆dom String.

textDocumentProxy.documentContextBeforeInput  //B Ran
textDocumentProxy.documentContextAfterInput   //dom String.

----- Cursor postion -----⇣ 
Any. A Random text. b Ran🙅dom String.

textDocumentProxy.documentContextBeforeInput  //Any. A Random text. b Ran
textDocumentProxy.documentContextAfterInput   //dom String.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment