From 4300a10cbda3fda5a961c603fa9fc8560b0348fb Mon Sep 17 00:00:00 2001 From: karthus <675377091@qq.com> Date: Thu, 30 Jun 2022 10:20:01 +0800 Subject: [PATCH] change coner radius --- Sources/did-motif-ios/DIDMotifUtils.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/did-motif-ios/DIDMotifUtils.swift b/Sources/did-motif-ios/DIDMotifUtils.swift index ac80506..8fccd54 100644 --- a/Sources/did-motif-ios/DIDMotifUtils.swift +++ b/Sources/did-motif-ios/DIDMotifUtils.swift @@ -132,7 +132,8 @@ public extension DIDMotifUtils { } public static func cornerRadiusWith(side: CGFloat) -> CGFloat { - return side > 80 ? 10 : floor(0.1*side + 2) + // 大于80时固定10 小于20时固定1 + return side > 80 ? 10 : (side <= 20 ? 1 : floor(0.1*side + 2)) } }