Latest 0.0.1
Homepage https://github.com/VernonVan/PPSnapshotKit
License MIT
Platforms ios
Frameworks UIKit, WebKit
Authors

对应的教程在这儿:iOS 截图的那些事儿

演示

安装

  1. 手动导入:

    下载 最新的代码并解压,将 PPSnapshotKit->Source 中的文件拖入您的项目中即可

  2. CocoaPods 安装:

    修改你的 PodFile 并添加以下依赖项:

    pod 'PPSnapshotKit'

使用

直接在需要截图的 View 上调用:

PPSnapshotHandler.defaultHandler.delegate = self;
[PPSnapshotHandler.defaultHandler snapshotForView:viewToCapture];

截图完成得到回调可以获取到 UIImage 类型的截图:

snapshotHandler:didFinish:forView:

Enjoy it ~

Latest podspec

{
    "name": "PPSnapshotKit",
    "version": "0.0.1",
    "summary": "iOS view screenshot, including UIScrollView, UIWebView and WKWebView",
    "homepage": "https://github.com/VernonVan/PPSnapshotKit",
    "license": "MIT",
    "authors": {
        "VernonVan": "https://www.jianshu.com/u/0da7f56c0a41"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/VernonVan/PPSnapshotKit.git",
        "tag": "0.0.1"
    },
    "source_files": "PPSnapshotKit/Source/*.{h,m}",
    "frameworks": [
        "UIKit",
        "WebKit"
    ]
}

Pin It on Pinterest

Share This