开发者

ToolBar Icons Are not Centered

I've implemented in my app a ToolBar. How do I control the buttons scale? I want them to be stretched from left to right. In the Interface Builder ---> ToolBar 开发者_如何学JAVAAttributes there is a field called "Mode" (where I can select between "Scale to Fit", "Aspect Fit" etc...) but it doesn't change anything.

Do I have to create the buttons' icons in a very specific size (if so, what should be the size for 6 buttons?) or can I set them in the Interface Builder?


If you're working in Interface Builder, you'll find an object in the Library called Flexible Space Bar Button Item. You just drag and place one of these objects in between any adjacent buttons, so that the objects on the toolbar end up ordered something like:

button-fsbbi-button-fsbbi-button-fsbbi-button 

These objects act as springs that keep your buttons equally spaced apart.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜