1

When creating custom UIView or UIScrollView subclasses for use with Core Text, how can we implement UITextPosition and UITextRange subclasses in discrete files of their own? We need these to implement UITextInput, UITextInputTraits and UIKeyInput protocols as well. It seems these must be subclassed entirely within the .m or .mm file of the relevant view class that we use it in... when trying to do it in separate files, errors abound. Try separating the implementations out of the .m files in these sample projects:

Apple's SimpleTextInput sample code. Try removing the UITextPosition and UITextRange subclasses from the EditableCoreTextView.m file into their own discreet files...

Try the same with enormego's EGOTextView (on Github).

(if you don't see errors, try converting to iOS 6.0 and ARC.)

uchuugaka
  • 12,679
  • 6
  • 37
  • 55

0 Answers0