How to change UIBarButtonItem's type in UINaviagationBar at runtime?
问题 I am working on an iPhone's view which composed 3 elements, UITextView, UIToolBar with an UIBarButtonItem. The goal is, I want UIBarButtonItem change its style from 'edit' (UIBarButtonSystemItemEdit) to 'Done' (UIBarButtonSystemItemDone) and update new selector to new method. First of all, I have tried following code but it doesn't work: Could you help me on this idea? 回答1: There is a builtin bar button with this behaviour, you get it via the editButtonItem property of a UIViewContoller.