iOS 中默认存在这个 UIBarButton 吗?怎么称呼
我想我以前见过这种按钮,现在我需要一个。
像下面的标签这样的按钮可以更改为我需要的任何数字(例如从 2 到 10)。
我感觉 iOS SDK 中默认存在此功能,但我似乎找不到它。
它是默认存在的还是我必须自己创建它?
谢谢!
I think I've seen this kind of button before, and now I need one.
A button like the one below who's label can be changed to whatever number I need (from 2 to 10 for example).
I have a feeling that this exists by default in iOS SDK but I can't seem to find it.
Does it exist by default or do I have to create it myself?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它很容易复制。在界面生成器中添加一个新的 RoundRectButton,然后在属性检查器中将类型更改为“自定义”。将BackgroundImage 设置为与上面类似的图像,然后将Title 设置为数字。默认情况下,标题将在按钮中居中,但您可以使用属性检查器中的“插入”选项,并使用“顶部”和“左侧”插入属性将标题向内和向下微移。
Its easy to replicate. Add a new RoundRectButton in interface builder, then in the attributes inspector change the type to Custom. Set the BackgroundImage to an image similar to above, and then set the Title to the number. By default the title will centered in the button, but you can use the Inset options in the attributes inspector and nudge the title in and down using the Top and Left inset attributes.
不,据我所知,这不是默认项目。您可以在 Apple 人机界面指南(请参阅“系统提供的按钮和图标”)。
No, it's not a default item as far as I know. You can see all the default items in the Apple Human Interface Guidelines (see "System-Provided Buttons and Icons").