title: NSTextAttachment custom view
body: <p>Is it possible to display a custom view in the spot where an <code>NSTextAttachment</code> is to be displayed on iOS? I have custom text storage and layout manager subclasses, but I'm not sure where to put the code to actually add a subview.</p>
  
  <p>(The reason I want to have this is to support inline equation editing. I have a custom text field class which will allow the user to type an equation, and I want this view to be added inside the body of another text view.)</p>
  
  <p>I've seen <a href="http://ossh.com.au/design-and-technology/software-development/implementing-rich-text-with-images-on-os-x-and-ios/" rel="noreferrer">this tutorial</a>, and while it seems like a good starting place it doesn't cover where the text attachment is actually drawn. So, specifically, <strong>what methods should I override to add a custom view in place of the default text attachment icon</strong>?</p>
  
  <p>Please let me know if what I want to do is possible, or whether I'm going about this the wrong way. Thanks for your help!</p>