{"id":2224,"url":"https://github.com/startry/SwViewCapture","last_synced_at":"2025-08-02T23:32:16.978Z","repository":{"id":56167194,"uuid":"51987199","full_name":"startry/SwViewCapture","owner":"startry","description":"A nice iOS View Capture Swift Library which can capture all content.","archived":false,"fork":false,"pushed_at":"2020-11-23T07:13:50.000Z","size":1094,"stargazers_count":604,"open_issues_count":13,"forks_count":87,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-24T14:15:57.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/startry.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-18T07:00:16.000Z","updated_at":"2024-04-18T04:03:03.000Z","dependencies_parsed_at":"2022-08-15T14:00:29.060Z","dependency_job_id":null,"html_url":"https://github.com/startry/SwViewCapture","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startry%2FSwViewCapture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startry%2FSwViewCapture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startry%2FSwViewCapture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startry%2FSwViewCapture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/startry","download_url":"https://codeload.github.com/startry/SwViewCapture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503144,"owners_count":17930520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:08.122Z","updated_at":"2024-12-06T17:30:51.312Z","avatar_url":"https://github.com/startry.png","language":"Swift","funding_links":[],"categories":["Swift","UI"],"sub_categories":["Other free courses","Font","Other Testing"],"readme":"# SwViewCapture\n\nA nice iOS View Capture Library which can capture all content.\n\nSwViewCapture could convert all content of UIWebView to a UIImage.\n\n一个用起来还不错的iOS截图库.(支持截取所有内容, 适用于所有ScrollView组成的视图, 包括WKWebView)\n\nSwViewCapture支持截取网页以及ScrollView的所有内容\n\n[![Version](https://img.shields.io/cocoapods/v/SwViewCapture.svg?style=flat)](http://cocoapods.org/pods/SwViewCapture)\n[![License](https://img.shields.io/cocoapods/l/SwViewCapture.svg?style=flat)](http://cocoapods.org/pods/SwViewCapture)\n[![Platform](https://img.shields.io/cocoapods/p/SwViewCapture.svg?style=flat)](http://cocoapods.org/pods/SwViewCapture)\n\n \u003cimg src=\"https://raw.githubusercontent.com/startry/SwViewCapture/master/capture_demo.gif\" width =\"320\" alt=\"Example\" align=center /\u003e\n\n## Feature\n\n1. API is more easy to use.\n\t* use swift extension\n2. Support to capture all content of scrollView. \n\t* eg: UIScrollView, UITableView, UIWebView\n3. Support capture WKWebView. \n\t* WKWebview is hard to capture; \n\t* WKWebView could be capture like UIWebView\n4. Flasing will not appear in the process of Screenshots.\n\t* SwCaptureView use a fake screenshots as a cover which over target view. All the action of target will be hidden below the fake screenshots.\n\n###功能\n\n1. API更容易使用.\n\t* 使用Extension去封装API\n\n2. 支持截取滚动视图内的所有内容.\n\t* 支持UIScrollView, UITableView, UIWebView\n\n3. 支持截取WKWebView的内容.\n\t* 因为WKWebView的内部实现问题, WKWebView比较难去截屏\n\t* 目前SwViewCapture对WKWebView的支持比较完美, 已经提供了两种截图方法, 非滚动的截图方式已经解决了`position: fixed`的问题\n4. 截图过程中不会出现视图闪烁.\n\t* 截图过程中, 使用一张伪装截图遮盖屏幕, 底层截图活动不透明化。\n\t\n\n## Usage\n\n* Capture basic screenshots (size of view's frame)\n\n``` Swift\nimport SwViewCapture\n// ...\nview.swCapture { (capturedImage) -\u003e Void in\n\t// capturedImage is a UIImage.           \n}\n```\n\n* Capture all content screenshots (size of content)\n\n``` Swift\nimport SwViewCapture\n// ...\nview.swContentCapture { (capturedImage) -\u003e Void in\n\t// capturedImage is a UIImage.           \n}\n```\n\n###用法\n\n* 普通截屏(屏幕大小)\n\n``` Swift\nimport SwViewCapture\n// ...\nview.swCapture { (capturedImage) -\u003e Void in\n\t// capturedImage is a UIImage.           \n}\n```\n\n* 内容截屏(全部内容的大小)\n\n``` Swift\nimport SwViewCapture\n// ...\nview.swContentCapture { (capturedImage) -\u003e Void in\n\t// capturedImage is a UIImage.           \n}\n```\n\n* 滚动截屏\n\n``` Swift\nimport SwViewCapture\n// ...\nview.swContentScrollCapture { (capturedImage) -\u003e Void in\n\t// capturedImage is a UIImage.           \n}\n```\n\n## Requirement\n\niOS 8.0+, Swift 2.0+ or Swift 3.0(Compatiable)\n\nSwViewCapture is available through [CocoaPods](http://cocoapods.org) now. To Install it, simply and the following line to your Podfile:\n\n``` ruby\npod \"SwViewCapture\"\n```\n\nOr, if you’re using [Carthage](https://github.com/Carthage/Carthage), add SwViewCapture to your Cartfile:\n\n``` \ngithub \"startry/SwViewCapture\"\n```\n\n## License\n\nSwViewCapture is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartry%2FSwViewCapture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartry%2FSwViewCapture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartry%2FSwViewCapture/lists"}