Skip to content

Commit

Permalink
MirrorView scrolls
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBarnegren committed Apr 20, 2021
1 parent 75b4ec1 commit a548e94
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions MirrorUI/MirrorUI/MirrorView/MirrorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,23 @@ public struct MirrorView: View {

public var body: some View {

VStack(alignment: .leading, spacing: 10) {

ForEach(objectProperties) { property -> AnyView in
ScrollView {
VStack(alignment: .leading, spacing: 10) {

self.makeControlView(
propertyName: property.name,
displayName: property.displayName,
state: property.viewStateStorage
)

}
Spacer()
}.padding()
ForEach(objectProperties) { property -> AnyView in

self.makeControlView(
propertyName: property.name,
displayName: property.displayName,
state: property.viewStateStorage
)

}
Spacer()
}.padding()
}
}

private func makeControlView(propertyName: String, displayName: String, state: Ref<[String: Any]>) -> AnyView {
let value = Mirror(reflecting: object).children
.first { $0.label == propertyName }
Expand Down

0 comments on commit a548e94

Please sign in to comment.