调整 UIToolbar 大小会在 App Store 中被拒绝?
我认为它不使用私有API,它会被拒绝吗?
self.navigationController.toolbar.frame =
CGRectMake(self.navigationController.toolbar.frame.origin.x,
self.navigationController.toolbar.frame.origin.y,
self.navigationController.toolbar.frame.size.width, 60);
i think it not use private API , it will be rejected?
self.navigationController.toolbar.frame =
CGRectMake(self.navigationController.toolbar.frame.origin.x,
self.navigationController.toolbar.frame.origin.y,
self.navigationController.toolbar.frame.size.width, 60);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
苹果说你不会以编程方式。
准则
使用工具栏提供用户可以在当前上下文中执行的一组操作。
使用工具栏为人们提供在当前上下文中有意义的常用命令的选择。另一种方法是在工具栏中放置分段控件,以便人们可以访问应用程序数据的不同视角或不同的应用程序模式(有关使用指南,请参阅“分段控件”)。
为每个工具栏项目保持至少 44 x 44 点的命中目标区域。如果工具栏项目挤得太近,人们就很难点击他们想要的项目。
根据记录的含义使用系统提供的工具栏项目。有关详细信息,请参阅“工具栏和导航栏中使用的标准按钮”。如果您决定创建自己的工具栏项,请参阅“导航栏、工具栏和选项卡栏的图标”以获取有关如何设计它们的建议。
尽量避免在同一工具栏中混合普通样式(无边框)和有边框的工具栏项目。您可以在工具栏中使用任一样式,但混合使用它们通常看起来不太好。
在适当的时候指定工具栏的颜色或半透明度。如果您希望工具栏与应用程序的整体外观协调,您可以指定自定义颜色。如果您想鼓励人们更多地关注工具栏下方的内容,您可以将工具栏设置为半透明。确保您所做的工具栏自定义与应用程序其余部分的外观一致。例如,如果您使用半透明工具栏,请勿将其与不透明导航栏结合使用。并且,避免在同一方向的不同屏幕中更改工具栏的颜色或半透明度。
在 iPhone 上,请考虑设备旋转时工具栏高度的自动变化。特别是,请确保您的自定义工具栏图标能够很好地适合横向显示的细栏。 不要以编程方式指定工具栏的高度。
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW33
apple says u wont by programatically.
Guidelines
Use a toolbar to provide a set of actions users can take in the current context.
Use a toolbar to give people a selection of frequently used commands that make sense in the current context. An alternative is to put a segmented control in a toolbar to give people access to different perspectives on your application’s data or to different application modes (for usage guidelines, see “Segmented Control”).
Maintain a hit target area of at least 44 x 44 points for each toolbar item. If you crowd toolbar items too closely together, people have difficulty tapping the one they want.
Use system-provided toolbar items according to their documented meaning. See “Standard Buttons for Use in Toolbars and Navigation Bars” for more information. If you decide to create your own toolbar items, see “Icons for Navigation Bars, Toolbars, and Tab Bars” for advice on how to design them.
Try to avoid mixing plain style (borderless) and bordered toolbar items in the same toolbar. You can use either style in a toolbar, but mixing them does not usually look good.
Specify the color or translucency of a toolbar, when appropriate. If you want the toolbar to coordinate with the overall look of your app, you can specify a custom color. You can make a toolbar translucent if you want to encourage people to pay more attention to the content underneath the bar. Make sure the toolbar customization you do is consistent with the look of the rest of your application. If you use a translucent toolbar, for example, don’t combine it with an opaque navigation bar. And, avoid changing the color or translucency of the toolbar in different screens in the same orientation.
On iPhone, take into account the automatic change in toolbar height that occurs on device rotation. In particular, make sure your custom toolbar icons fit well in the thinner bar that appears in landscape orientation. Don’t specify the height of a toolbar programmatically.
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW33