我需要创建一个具有两个UIBarButtonItems的UIToolbar。第一个按钮必须居中,第二个项目必须右对齐。UIToolbar UIBarButtonItem对齐问题
我理解并使用灵活的间距,当我需要平衡整个UIToolbar的按钮时,它的工作效果很好,但只有两个按钮,我似乎无法完美地居中中间按钮。我甚至有
NSArray *items = [[NSArray alloc] initWithObjects:fixed, flex, center_button, flex, right_button, nil];
初始化view.toolbarItems阵列,并设置fixed.width = right_button.width ......但尽管如此,center_button永远不会完全集中。
请务必使用工具包进行标记,以便人们可以通过标签隐藏与其无关的问题。 – doublep 2010-05-02 18:41:34