简体   繁体   English

Apple Watch 上带有图标的按钮

[英]Button with icon on Apple Watch

I'm creating an App for Apple Watch which has a menu with two buttons like the Instagram App does.我正在为 Apple Watch 创建一个应用程序,它有一个像 Instagram 应用程序那样带有两个按钮的菜单。 I'm wondering how you can put an Image file and text inside one button.我想知道如何将图像文件文本放在一个按钮中。

(It's not two separate objects as both image and text grey out when you click it.) (它不是两个单独的对象,因为单击它时图像和文本都会变灰。)

Instagram 屏幕截图显示带有图标和文本的按钮

The only thing I can think of is that the icon and text were created as an image file and used as the background image of the button.我唯一能想到的是图标和文本被创建为图像文件并用作按钮的背景图像。

Could there be another way? 能不能有别的办法?

  • Add a group element and in the Layout property choose Overlap添加组元素并在布局属性中选择重叠
  • now all objects in the group are stacked现在组中的所有对象都堆叠在一起

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM