We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a style for shadows
import UIKit open class ShadowStyle { public var opacity: CGFloat = 0.0 public var radius: CGFloat = 0.0 public var offset: CGSize = .zero public var color: UIColor = .clear var shadow: NSShadow { let shadow = NSShadow() shadow.shadowBlurRadius = radius shadow.shadowOffset = offset shadow.shadowColor = color.withAlphaComponent(opacity) return shadow } } // MARK: - Equatable extension ShadowStyle: Equatable { public static func == (lhs: ShadowStyle, rhs: ShadowStyle) -> Bool { return lhs.color == rhs.color && lhs.offset == rhs.offset && lhs.radius == rhs.radius && lhs.opacity == rhs.opacity } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add a style for shadows
The text was updated successfully, but these errors were encountered: