Skip to content

Commit

Permalink
tweaking preview formatting for SwiftUI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
heckj committed Feb 25, 2020
1 parent 914f382 commit 792d19e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion SwiftUI-Notes/HeadingView.swift
Expand Up @@ -65,8 +65,16 @@ struct HeadingView: View {
}
}

// MARK: - SwiftUI VIEW DEBUG

#if DEBUG
var locproxy = LocationProxy()

struct HeadingView_Previews: PreviewProvider {
static var previews: some View {
HeadingView(locationModel: LocationProxy())
HeadingView(locationModel: locproxy)
}
}
#endif


9 changes: 8 additions & 1 deletion SwiftUI-Notes/ReactiveForm.swift
Expand Up @@ -58,8 +58,15 @@ struct ReactiveForm: View {
}
}

// MARK: - SwiftUI VIEW DEBUG

#if DEBUG
var localModel = ReactiveFormModel()

struct ReactiveForm_Previews: PreviewProvider {
static var previews: some View {
ReactiveForm(model: ReactiveFormModel())
ReactiveForm(model: localModel)
}
}
#endif

0 comments on commit 792d19e

Please sign in to comment.