Skip to content

Commit

Permalink
public fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CreatFish committed Apr 24, 2022
1 parent 6cfc5f2 commit c9822a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/did-motif-ios/DIDMotifUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ public extension DIDMotifUtils {
/// 根据当前frame的任一边长算出的居中path
/// - Parameter side: 当前frame的长或宽(理论讲DIDMotifView的frame应该都是长宽相等的)
/// - Returns: path
static func squarePathWith(side: CGFloat) -> UIBezierPath {
public static func squarePathWith(side: CGFloat) -> UIBezierPath {
return UIBezierPath.init(roundedRect: CGRect(x: 0, y: 0, width: side, height: side), cornerRadius: cornerRadiusWith(side: side))
}

/// 根据当前frame的任一边长算出的居中path
/// - Parameter side: 当前frame的长或宽(理论讲DIDMotifView的frame应该都是长宽相等的)
/// - Returns: path
static func rectanglePathWith(side: CGFloat) -> UIBezierPath {
public static func rectanglePathWith(side: CGFloat) -> UIBezierPath {
let height = side*0.7
let y = (side - height)/2
return UIBezierPath.init(roundedRect: CGRect(x: 0, y: y, width: side, height: height), cornerRadius: cornerRadiusWith(side: side))
Expand All @@ -127,7 +127,7 @@ public extension DIDMotifUtils {
/// 根据当前frame的任一边长算出的居中path
/// - Parameter side: 当前frame的长或宽(理论讲DIDMotifView的frame应该都是长宽相等的)
/// - Returns: path
static func circlePathWith(side: CGFloat) -> UIBezierPath {
public static func circlePathWith(side: CGFloat) -> UIBezierPath {
return UIBezierPath.init(roundedRect: CGRect(x: 0, y: 0, width: side, height: side), cornerRadius: side/2)
}

Expand Down

0 comments on commit c9822a7

Please sign in to comment.