简体   繁体   English

苹果手表圆形按钮

[英]Apple watch circular buttons

How to design circular buttons in Apple watch? 如何在Apple Watch中设计圆形按钮? What would be the approach to design a screen like the contacts application of the watch. 设计类似于手表的联系人应用程序的屏幕的方法是什么。

I don't know if this is what you want, but you could try this: 我不知道这是否是您想要的,但是您可以尝试以下方法:

-open your Graphic/Design-Application (Photoshop, Gimp or whatever) -打开您的图形/设计应用程序(Photoshop,Gimp或其他)

-create a circle-button and save the image -创建一个圆形按钮并保存图像

-in Xcode, drag a button into your interface -在Xcode中,将一个按钮拖到您的界面中

-go to the attributes inspector of the button and set your image at background > image -转到按钮的属性检查器,然后将图像设置为background> image

Please, find my answer for your query. 请为的查询找到我的答案 I hope that it will help you more. 希望对您有所帮助。

If you want to design a screen like favorite contact app on apple-watch, then the WWDC video link given in my answer will definitely guide you. 如果您想在Apple Watch上设计喜欢的联系人应用程序之类的屏幕,那么我的答案中给出的WWDC视频链接肯定会为您提供指导。

I have designed app with a circular menu which is not exactly same as the apple's favorite app, But it has almost have a circular view with statically. 我设计的应用程序具有圆形菜单,与苹果最喜欢的应用程序并不完全相同,但是它几乎具有静态的圆形视图。 For that, I have used Groups in horizontal layout for each horizontal item with proper alignment of inside groups. 为此,我对每个水平项目使用了水平布局中的“组”,并正确对齐了内部组。

屏幕

You can achieve this using group, 您可以使用组来实现,

  1. Drag group object and drop it in interface builder 将组对象拖放到界面生成器中
  2. set equal height and width to the group 为组设置相同的高度和宽度
  3. In attribute inspector, set custom radius to half of the height value set.For Eg: if height and width is set as 30, then the radius will be 15. This will give you round shape. 在属性检查器中,将自定义半径设置为高度值的一半。例如:如果将高度和宽度设置为30,则半径将为15。这将为您提供圆形。
  4. Add color or image based on the need 根据需要添加颜色或图像
  5. Add tap gesture to the group and add action to the gesture. 将轻击手势添加到组,然后将操作添加到手势。 Handle stuffs here that are needed to be handled on clicking it 单击此处处理需要处理的内容

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

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