Hello I'm trying to create a custom text editor, for which I want to know the position of the cursor and range of the text in UITextView
for which I can apply TextAttributes
based on the user selected options.
For eg:
\n This is a the first paragraph string \n This is the second paragraph string \n
For this string, if the cursor is anywhere in the first paragraph string, and user select some text attribute, then I want to change only the This is a the first paragraph string
based on selection.
For now, I know this can be achieved using multiple text attributes for specific range.I'm unable to get the range based on the cursor and break characters.
I'm new to this. If there is some other way to achieve this please let me know. Thanks