How can I provide a visually distinct bar button item background image for bar buttons with the UIBarButtonItemStyleDone style and the editing state of the Edit/Done button? None of the documented UIControlState values in the UIBarButtonItem appearance proxy's setBackgroundImage:forState:barMetrics: seem to do the trick.
相关问题
- what is the difference between bounded and unbound
- didSelectViewController method not being called (w
- ios5 background management different from ios4?
- CoreBluetooth - Can connectPeripheral be called mu
- reloadData doesn't work
相关文章
- Popover segue to static cell UITableView causes co
- Creating UIImage from CIImage
- UIAlertViewStylePlainTextInput return key delegate
- AVCaptureDeviceOutput not calling delegate method
- How to call an action when UISwitch changes state?
- Making any tweet favourite through iOS 5 twitter A
- Unable to pass NSManagedObjectContext to my view c
- iOS 5.1 Reachability
I have just found and posted a possible solution to this problem. You can 'inject' custom styles using a UIBarButtonItem category:
I'm not sure why this was never answered but if you are still looking then simply create a property for a BarButtonItem in your .h, assign it in IB, then set the background property of that barButtonItem. Works fine for me and never "changes back to default appearance".