Skip to content
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

Merged
merged 5 commits into from
Jun 2, 2023
Merged

AttributeContainer extensions #58

merged 5 commits into from
Jun 2, 2023

Conversation

RomanPodymov
Copy link
Contributor

Hello.
Thank you for SwiftyAttributes.
AttributeContainer extensions.

@RomanPodymov
Copy link
Contributor Author

Hello @eddiekaiger
I will add more AttributeContainer extensions later.

@RomanPodymov
Copy link
Contributor Author

Hello @eddiekaiger
Any updates?

#if canImport(UIKit)
@available(iOS 15.0, tvOS 15.0, watchOS 8.0, *)
public extension AttributeContainer {
mutating func set(attribute: Attribute) {
Copy link
Owner

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

Copy link
Contributor Author

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 { /* */ }
    }
}

?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

@eddiekaiger eddiekaiger merged commit 7b39078 into eddiekaiger:master Jun 2, 2023
@RomanPodymov RomanPodymov deleted the feature/attribute_container branch June 2, 2023 21:32
RomanPodymov added a commit to RomanPodymov/RomanPodymov that referenced this pull request Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants