-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
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
AttributeContainer extensions #58
AttributeContainer extensions #58
Conversation
Hello @eddiekaiger |
Hello @eddiekaiger |
#if canImport(UIKit) | ||
@available(iOS 15.0, tvOS 15.0, watchOS 8.0, *) | ||
public extension AttributeContainer { | ||
mutating func set(attribute: Attribute) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary in this PR, but would be neat to also add a custom subscript to set
and get
the attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @eddiekaiger
Do you mean something like
public extension AttributeContainer {
subscript(attribute: Attribute) -> Any? {
get { /* */ }
set { /* */ }
}
}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep!
Hello.
Thank you for SwiftyAttributes.
AttributeContainer
extensions.