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)) } }