WKInterfaceGroup bottom corner radius

南楼画角 提交于 2019-12-03 21:08:46

You asked about WKInterfaceGroup, but from your response to @BalestraPatrick it sounds like you are specifically trying to achieve bottom corner rounding in the long-look notification, correct?

If so, it's a bug in the current beta.

Assuming you can sign in, here's a developer forum describing the bug: https://devforums.apple.com/message/1098796

The gist is: there used to be a boolean on the Category (where sash color is) to offset content (that's what Apple's Documentation is referring to here https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html) but they took it out of Beta 5. Now, you are supposed to be able to set the background color of the notification controller itself and it will do the rounding for you. Just doesn't work yet.

I've logged a bug with Apple and had it closed as a "duplicate" - which means it's a bug and they know about it. Feel free to log again - it increases the priority of the bug in their queue :)

I hope this answer is what you're looking for.

After thinking about it for some time, I came up with a solution. There is no solution in code. I think this is how Apple is doing the same effect for the calendar notification view.

You need to make the main group's backgroundColor white. Then in the top group set the background color to some other color (like red in my case). Then add another group with the same background color as the container group. The result should be like this in the Apple Watch Simulator.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!