Code Monkey home page Code Monkey logo

gstouchesshowingwindow's Introduction

GSTouchesShowingWindow

A simple tool that automatically shows all touches inside your app as they are happening, using a circular image indicator. It's useful for creating iOS 8 App Previews, or any kind of app videos where you need to demonstrate some rich user interaction that might be hard to explain otherwise.

Example

How to set it up

  1. First, copy GSTouchesShowingWindow.h, GSTouchesShowingWindow.m and the [email protected] to your project.

A. Now, if you are using Storyboard in your project (and you should), do the following. If you are not using Storyboard, skip this step and check 2.b.
In your AppDelegate.m, import the header:

#import “GSTouchesShowingWindow.h”

and add the following -window method. This will provide the app with our own window instance instead of the default UIWindow.

- (GSTouchesShowingWindow *)window {
    static GSTouchesShowingWindow *window = nil;
    if (!window) {
        window = [[GSTouchesShowingWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    }
    return window;
}

B. If you are still using plain old .xib files, you only need to open your MainWindow.xib, select the window and then change the class in Identity Inspector from UIWindow to GSTouchesShowingWindow. Like this:

  1. That’s it! There is no step three.

How it actually works

Inside the UIWindow subclass, I am just overriding the -sendEvent method, processing all the events and adding/moving/removing imageViews based on those events' touches. And then I call [super sendEvent]; so that the touches are forwarded to the app.

If you have any questions, you can contact me on Twitter <a href="http://twitter.com/luksape target="_blank">@luksape.

gstouchesshowingwindow's People

Contributors

d0n13 avatar

Watchers

 avatar  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.