Apple used to have a CoreText sample project and when TextKit launched they had a sample project for that too. You can't search from them through the normal document library you need to use the legacy library
You can however checkout the textView part of the UICatelog and that should get you started. It is a textview with attributed text and is fully editable.
Also have a read through the text programming guide.