koss koss - 13 days ago 7
Objective-C Question

iOS how to insert UITextField inline within UITextView

Is there a way to insert text inputs inline inside a block of text? I need to allow users to input some data inline within text. I thought that I would be able to use

NSMutableString
with attachments, but it seems to support only
UIImage
as attachments.

This is an example of what I'm trying to achieve:

enter image description here

Thanks!

Answer

You should take a closer look to CoreText which gives you a very fine grained access to text layout. But anyway, this is a difficult task. You may create a HTML-Page with input fields and display it in a WKWebView, which should be much easier to implement.

Comments