https://github.com/robb/visualizetouches
Touch Visualization in SwiftUI
https://github.com/robb/visualizetouches
airplay collaboration debugging ios screenrecording swiftui
Last synced: 3 months ago
JSON representation
Touch Visualization in SwiftUI
- Host: GitHub
- URL: https://github.com/robb/visualizetouches
- Owner: robb
- License: mit
- Created: 2025-03-03T19:22:39.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-03T19:37:20.000Z (4 months ago)
- Last Synced: 2025-03-04T09:30:12.437Z (3 months ago)
- Topics: airplay, collaboration, debugging, ios, screenrecording, swiftui
- Language: Swift
- Homepage:
- Size: 6.84 KB
- Stars: 30
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# `visualizeTouches()`
There's the kind of work that has your fingerprints all over it. However, Screen Recording only captures what happens under the glass, leaving people to guess where you put your fingers down. What if there was a better way?
https://github.com/user-attachments/assets/9a6d43aa-9bfe-4b0a-8ba6-0690c0de71aa
Using the `visualizeTouches()` View modifier for SwiftUI, you can visualize touches when you're recording your screen or mirroring it, e.g. via AirPlay.
This happens automatically, normal use is not affected.
```swift
List {
Button("Hello") {}
Button("Hello") {}
Button("Hello") {}
}
.visualizeTouches()
```Additionally, touches will be visualized in the iOS Simulator, to prevent overfitting your designs for the macOS cursor.
If you need more fine-grained control, there's an additional `visualizeTouches(_:)` overload that takes a `Bool` parameter.
### See also
- [TouchInspector](https://github.com/jtrivedi/TouchInspector) by [@jtrivedi](https://github.com/jtrivedi)