How big should a UIBarButtonItem image be?(UIBarButtonItem 图像应该有多大?)
问题描述
我正在寻找创建自己的自定义按日期排序"和按数字排序"按钮,我计划将它们放在导航栏中作为右侧按钮.
I'm looking to create my own custom Sort By Date and Sort By Number buttons that I plan on placing in the navigation bar as the right button.
我的图像应该有多大才能适当地填充空间——UIBarItem 文档页面没有列出任何有关图像大小的信息.
How big should my image be to appropriately fill the space -- the UIBarItem documentation page doesn't list anything about the size the image should be.
推荐答案
从 iOS 11 开始,人机界面指南建议工具栏和导航栏中的字形约为 25×25 点,最多约为 28 点.(如果您正在使用 iOS 应用程序,HIG 绝对应该在您的书签中!)
As of iOS 11, the Human Interface Guidelines suggest glyphs be about 25×25 points in toolbars and navigation bars, up to a maximum of about 28 points. (And the HIG should definitely be in your bookmarks if you're working on iOS apps!)
对于 iPad 2/Mini 等旧设备,图像 25 像素正方形,iPhone 8 或 iPad 等大多数当前设备的 50 像素正方形,Retina HD 设备(iPhone 6/7/8 Plus 或 iPhone)的 75 像素正方形X).资产目录将极大地帮助组织不同的资产大小(Xcode 甚至可以从这些天来矢量来源).
That would translate to images 25px square for older devices like iPad 2 / Mini, 50px square for most current devices like iPhone 8 or iPad, and 75px square for Retina HD devices (the iPhone 6/7/8 Plus, or iPhone X). Asset catalogs will help immensely in keeping the different asset sizes organized (and Xcode can even generate them from vector sources these days).
这篇关于UIBarButtonItem 图像应该有多大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:UIBarButtonItem 图像应该有多大?


- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01