SnapshotKit
UIView/UIWindow/UIScrollView/UITableView/UIWebView/WKWebView Extension to easily take snapshot image of visible or full content.
Install / Use
/learn @YK-Unit/SnapshotKitREADME
SnapshotKit
A Kit that can make UIView/UIWindow/UIScrollView/UITableView/UIWebView/WKWebView to easily take snapshot image of visible or full content.
Example
To run the example project, clone the repo, and run pod install from the Example directory first.
UIView Example
func uiView_takeSnapshotOfVisibleContent() {
let image = self.view.takeSnapshotOfVisibleContent()
// edit image
}
func uiView_sync_takeSnapshotOfFullContent() {
let image = self.view.takeSnapshotOfFullContent()
// edit image
}
func uiView_async_takeSnapshotOfFullContent() {
self.view.asyncTakeSnapshotOfFullContent { (image) in
// edit image
}
}
UIScrollView Example
private func takeSnapshotOfVisibleContent() {
let image = self.scrollView.takeSnapshotOfVisibleContent()
// edit image
}
private func sync_takeSnapshotOfFullContent() {
let image = self.scrollView.takeSnapshotOfFullContent()
// edit image
}
private func async_takeSnapshotOfFullContent() {
self.scrollView.asyncTakeSnapshotOfFullContent { (image) in
// edit image
}
}
UITableView Example
func uiTableView_takeSnapshotOfVisibleContent() {
let image = self.tableView.takeSnapshotOfVisibleContent()
// edit image
}
func uiTableView_sync_takeSnapshotOfFullContent() {
let image = self.tableView.takeSnapshotOfFullContent()
// edit image
}
func uiTableView_async_takeSnapshotOfFullContent() {
self.tableView.asyncTakeSnapshotOfFullContent { (image) in
// edit image
}
}
WKWebView Example
private func takeSnapshotOfVisibleContent() {
let image = self.webView.takeSnapshotOfVisibleContent()
// edit image
}
private func sync_takeSnapshotOfFullContent() {
let image = self.webView.takeSnapshotOfFullContent()
// edit image
}
private func async_takeSnapshotOfFullContent_bySpliter() {
self.webView.scrollView.asyncTakeSnapshotOfFullContent { (image) in
// edit image
}
}
private func async_takeSnapshotOfFullContent_byPrinter() {
self.webView.asyncTakeSnapshotOfFullContent { (image) in
// edit image
}
}
Installation
SnapshotKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SnapshotKit'
License
SnapshotKit is available under the MIT license. See the LICENSE file for more info.
Related Skills
qqbot-channel
348.5kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.3k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
348.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
