I have a UILabel with NSAttribtuedString and need to find all CGRects corresponding to a certain NSRange in the string. Is there any non-hacky way I can accomplish this?
I'm looking for this because I intend to overlay highlight views over the label like this:
I'm aware that UITextView is much more suitable for this as it implements UITextInput protocol (which has all the methods I need), but due to a bug in iOS I'm limited to UILabel.
I've looked for solution without success. This gist didn't work for me and I haven't found any UILabel subclass that would implement any such method that would help me.
Any suggestions? Pete.