Giter Site home page Giter Site logo

devinsomnia / ios-screenshot-detection-handler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dennisfedorko/ios-screenshot-detection-handler

0.0 1.0 0.0 144 KB

Use to intercept when a user takes a screenshot and allow user to perform an action

Swift 100.00%

ios-screenshot-detection-handler's Introduction

iOS-Screenshot-Detection-Handler

Use to intercept when a user takes a screenshot and allow user to perform an action

How To Use

  1. Download ScreenshotDetectionView.swift and drag into project.
  2. Initialize ScreenshotDetectionView() and add as a subview to a ViewController.
  3. When a screenshot is taken, the method passed in as a selector in the ViewController class will be called. This can be set to repeat with the repeat: field in the initializer of ScreenshotDetectionView()

Example

Initialize view and add as a subview

//place in view controller
let detectView = ScreenshotDetectionView(parent: self, title: "title", message: "this is a message", selector: Selector("screenshotHandler"), repeats: true)
view.addSubview(detectView)

Create a method to handle response to "ok" of alert view

func screenshotHandler() {
    //gets called after user presses ok on alert
    //perform some function here
}

Requirements

Build currently supports the following configuration

  • Swift 2.0
  • XCode 7.0

ios-screenshot-detection-handler's People

Contributors

dennisfedorko avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.