Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Demo/RootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class RootViewController: UIViewController {
appearance.font = .boldSystemFont(ofSize: 16)
appearance.textInsets = UIEdgeInsets(top: 15, left: 20, bottom: 15, right: 20)
appearance.bottomOffsetPortrait = 100
appearance.cornerRadius = 20
appearance.cornerRadius = 20 // or use `appearance.cornerRadius(20)` if you are facing `Ambiguous use of cornerRadius` error.
appearance.maxWidthRatio = 0.7
}

Expand Down
5 changes: 5 additions & 0 deletions Sources/ToastView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,9 @@ open class ToastView: UIView {
return nil
}

/// Helper function for setting cornerRadius to avoid conflicting with UIView extension.
@objc public dynamic func cornerRadius(_ cornerRadius: CGFloat) {
self.cornerRadius = cornerRadius
}

}