views:

437

answers:

1

While showing a modal view I change the style of a UIBarButtonItem in the view controller beneath.

Though, when dismissing the modal view the UIBarButtonItem does not reflect the set style. Do I need to send some refresh message?

This is happening in the simulator. If the device behaves the same, I don't know.

A: 

After some more testing it seems that changes to a UIBarButtonItem in general are not propagated if it is not visible (either hidden by eg a modal view or just not on screen).

So for now my workaround is just to make sure the UIBarButtonItem is visible when changing it.

chaos0815