https://github.com/boybeak/wincapturer
A library for capturing window for macOS
https://github.com/boybeak/wincapturer
Last synced: about 1 year ago
JSON representation
A library for capturing window for macOS
- Host: GitHub
- URL: https://github.com/boybeak/wincapturer
- Owner: boybeak
- License: mit
- Created: 2024-06-23T10:11:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-23T10:30:35.000Z (about 2 years ago)
- Last Synced: 2025-02-06T01:42:55.520Z (over 1 year ago)
- Language: Swift
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WinCapturer
A library for capturing window for macOS
```swift
// 获取用户主目录路径
let homeDirectory = NSHomeDirectory()
// 构建 Downloads 目录路径
let downloadsPath = "\(homeDirectory)/Downloads/translator.png"
// 调用方法保存截图到指定路径
window.saveScreenshotTo(file: downloadsPath) { error in
}
```