As User enter some text in UITextview, User applies some operation like Bold, italic, Underline, Bullet, Background and Foreground color to the specific text.When Undo/redo operation is applied, it will erase the whole word instead of eliminating bold/italic or foreground/background color of the text in textview.
Here's the code for it.
[[txtViewNote undoManager] undo]; //Button Action Method for Undo