Skip to content

Commit 4ea87e8

Browse files
Update README.md
1 parent 6318452 commit 4ea87e8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ This makes it easy to run custom debug action.
106106

107107
As a built-in, we provide a modifier that displays the file name of the View.
108108

109-
<img width="379" alt="image" src="https://user-images.githubusercontent.com/2990285/165665379-79b3570a-d207-4f41-a621-0254e4d55da3.png">
109+
| Debug enabled | Debug disabled |
110+
| -- | -- |
111+
| <img width="300" alt="image" src="https://user-images.githubusercontent.com/2990285/165674830-b4167811-162c-4d9b-985c-eb8a22ff83e5.png"> | <img width="300" alt="image" src="https://user-images.githubusercontent.com/2990285/165674861-1b473561-c164-4d5e-8bb1-8a7bf77780a1.png"> |
110112

111113
The installation procedure is as follows. (recommended)
112114

@@ -121,8 +123,9 @@ import SwiftUISimulator
121123

122124
public extension View {
123125
func debugFilename(_ file: StaticString = #file) -> some View {
126+
// ✅ Enabled when debug build only.
124127
#if DEBUG
125-
simulatorDebugFilename(file) // 💡 Enabled when debug build only.
128+
simulatorDebugFilename(file) // 💡 or any `String`.
126129
#else
127130
self
128131
#endif
@@ -158,9 +161,9 @@ struct ExampleApp: App {
158161
} content: {
159162
RootView()
160163
//
161-
// ✅ Add `debugFilename` environment value to root view.
164+
// ✅ Add `simulatorDebugFilename` environment value to root view.
162165
//
163-
.environment(\.debugFilename, isEnabledDebugFilename)
166+
.environment(\.simulatorDebugFilename, isEnabledDebugFilename)
164167
}
165168
#else
166169
ContentView()

0 commit comments

Comments
 (0)