Reputation: 176
I can see in Apple Notes and other notes app that they have tables embedded into the text editor. Swift has NSTextTable, but it's just available for macOS. I'm wondering how I can add a table to both, macOS and iOS?
In addition, these tables should be interactive like in Apple Notes, like I can add a row or column, move them around, etc. I have seen this project which enables you to embed a NS/UIView into the editor, but this seems more like a hack.
Any ideas?
Upvotes: 1
Views: 557
Reputation: 259
I think that there is no simple way to add such attachments to a textView on iOS, you may try to find something in NSAttributedString, but probably it won't have a solution, so https://github.com/vlas-voloshin/SubviewAttachingTextView looks like a good option.
Upvotes: 1