As you can see from the screenshot, the View button text is aligned properly under Allowed Toolbar Items, but once I add it to the toolbar, it's aligned to the right. Why?
Asked
Active
Viewed 1,514 times
5
-
That's a good question, because it works fine in a trivial sample app. You'll have to post some code or give some more detail. – Jim Puls Nov 26 '11 at 18:50
-
(I meant to say it aligned to the right.) I have no code there yet, it's a new appl... just a default int main method. – janeh Nov 26 '11 at 18:51
1 Answers
8
You have to set sane minimum and maximum sizes for the toolbar item. I think you also have to make sure the autoresize masks (or constraints if you're using automatic layout) are set properly in the toolbar item's view (the NSSegmentedControl in this case). I don't have the "proper" settings handy but the min/max toolbar item size + correct autosizing behavior are the key here.

Joshua Nozzi
- 60,946
- 14
- 140
- 135
-
Yep, it worked. My min and max sizes were 70 and 100, it works once I make them the same! thanks. – janeh Nov 26 '11 at 19:01