Post

Replies

Boosts

Views

Activity

Mirror for static members?
Consider:struct TestStruct { let a = 3 static let b = 4 } let t = TestStruct() let m = Mirror(reflecting: t) for c in m.children { let label = c.label let value = c.value }The playground correctly shows "a" and "3".But what about b?How can I access the "type members" as opposed to the instance members?
3
3
3.0k
Aug ’22
Mirror for static members?
Consider:struct TestStruct { let a = 3 static let b = 4 } let t = TestStruct() let m = Mirror(reflecting: t) for c in m.children { let label = c.label let value = c.value }The playground correctly shows "a" and "3".But what about b?How can I access the "type members" as opposed to the instance members?
Replies
3
Boosts
3
Views
3.0k
Activity
Aug ’22