实际复制/提取了Apple的"iPhoneX的连续角落"吗? [英] Actually duplicate / extract Apple's "continuous corners for iPhoneX"?

查看:118
本文介绍了实际复制/提取了Apple的"iPhoneX的连续角落"吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhoneX的不同寻常的底角是Apple的新产品(2017年)"iPhoneX的连续角" .

The unusual bottom corners of an iPhoneX are Apple's new (2017) "continuous corners for iPhoneX".

对于任何有经验的iOS程序员来说, 近似 曲线都是微不足道的,但是:

It is trivial for any experienced iOS programmer to approximate the curve, but:

苹果没有解释这一点似乎很奇怪.

It does seem bizarre that Apple have not explained this.

要重复

  1. 对于任何经验丰富的iOS程序员来说,近似曲线都是不重要的.

这里要问的问题是苹果实际上如何做到的?

The question being asked here is specifically how to do Apple actually do it?

请不要再发布任何答案,向初学者展示如何绘制曲线并逼近iPhone曲线.

Please do not post any more answers showing beginners how to draw a curve and approximate the iPhone curve.

推荐答案

从iOS 13开始,有一个可用的API:

As of iOS 13, there's an API available for this:

https://developer.apple.com/documentation/quartzcore/calayercornercurve

请参见CALayerCornerCurve.continuous

这篇关于实际复制/提取了Apple的"iPhoneX的连续角落"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆