Mathieu
Mathieu

Reputation: 1175

Add rightBarButton to existing rightBarButtonItem in navigationBar

I have a UIViewController with a rightbarButton already present in the navBar I want on certain occasion to add an other rightBarButton to the one already present...

I used the first answer of this question but it doesn't work : it adds the new rightbarbutton but removes the first that was present before

Is there any other solution?

Upvotes: 0

Views: 142

Answers (1)

David Ravetti
David Ravetti

Reputation: 2040

Please see this related post

Basically you need to use the plural form rightBarButtonItems instead of the singular rightBarButtonItem to create an array of buttons.

Upvotes: 1

Related Questions