Out of the box, you can only format a UITextField in its entirety.
There are some libraries that will help you display text using attributed strings but if you need editing capabilities you will have to pretty much write it all from the ground up using CoreText and UITextInput delegation.
From the research I've done, even the magnifying loupe and text selection controls will need to be recreated from scratch.
Have a look at the Omnigroup framework released on Github https://github.com/omnigroup and look for their Rich Text editor which will give you an idea of what's involved.
There's an alternative to this with the next iOS release and UIWebView but it cannot be discussed here as it is stil under NDA so you may want to head to the Apple forums if you need more info on it.