views:

146

answers:

1

Hi all,

How can I change the style of a edit button from a table view? I tried it with the following code but it doesn't work.

self.navigationItem.rightBarButtonItem = self.editButtonItem;
self.navigationItem.rightBarButtonItem.style = UIBarButtonItemStylePlain;

Thanks in advance.
Sean

A: 

Are you doing this in ViewDidLoad? You can't just change the button on a whim; there has to be a UIView change to trigger a change.

Jason B
Yes, I'm doing this in ViewDidLoad. Ok, so what would suggest? What's the best way to do this?
Sean