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
再帰型構造体を使用し、SKNodeBuilder の Modifier と同じように実装することで Attribute を自作できるようになります。
The text was updated successfully, but these errors were encountered:
protocol CustomElement { associatedtype T var value: T { get } var keyPath: WritableKeyPath<AttributeContext, T> { get } }
Sorry, something went wrong.
protocol AttributeLinkList { associatedtype T: CustomElement }
構造体に KeyPath をプロパティに持たせようと以下のようなコードにしました。
struct AttributeContext { var container = AttributeContainer() } struct BackgroundColor: CustomElement { let value: Color var keyPath: WritableKeyPath<AttributeContext, Color> { \.container.backgroundColor } }
しかし、KeyPath が static subscript を指し示すことはできないようでした。
No branches or pull requests
再帰型構造体を使用し、SKNodeBuilder の Modifier と同じように実装することで Attribute を自作できるようになります。
The text was updated successfully, but these errors were encountered: