UIBarButtonItem setTitlePositionAdjustment on iOS 7 Navigation Bar

Viewed 2171

I have a UINavigationBar that has a new height of 85 and is fixed for landscape and portrait. I am adding an edit button at the top right corner but it wont stay there.

I've used the following:

[item setTitlePositionAdjustment:UIOffsetMake(0, -47) forBarMetrics:UIBarMetricsDefault];

But, if I rotate the device it moves back down 47 to the original location. If I change the metrics again it moves back to the original location. If I replace the button with another button it moves the new button to the original location, and setting the position for the new button does nothing.

I can't figure out how to move the button and get it to stay. There's no way to use constraints on the UIBarButtonItem.

1 Answers
Related