Skip to content

Implementation of Mirror not affected by CustomReflectable

License

Notifications You must be signed in to change notification settings

p-x9/swift-magic-mirror

Repository files navigation

MagicMirror

Implementation of Mirror not affected by CustomReflectable.

Github issues Github forks Github stars Github top language

About

Normal Mirror may not correctly yield property information if the object conforms to CustomReflectable.

For example, the following structure returns empty children.

struct Item: CustomReflectable {
    let title: String
    let value: Int

    var customMirror: Mirror {
        .init(self, children: [])
    }
}

I created MagicMirror so that information can be obtained correctly in such cases!

Usage

Simply replace MagicMirror in place of regular Mirror.

License

MagicMirror is released under the MIT License. See LICENSE

About

Implementation of Mirror not affected by CustomReflectable

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages