Git Product home page Git Product logo

mdcfocusview's Introduction

MDCFocusView

Bitdeli Badge

Apply a "tutorial screen" overlay to your application window. MDCFocusView can apply a focus on an arbitrary number of views, and prevents users from tapping views not currently focused on.

Check out a demo on Vimeo.

How to Use

You can install the project using Cocoapods, by placing pod MDCFocusView in your Podfile. After installing:

// Initialize MDCFocusView and customize its background color
MDCFocusView *focusView = [MDCFocusView new];
focusView.backgroundColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f];

// Register a MDCFocalPointView subclass to "wrap" focal points
focusView.focalPointViewClass = [MDCSpotlightView class];

// Add any number of custom views to MDCFocusView
[focusView addSubview:[self buildLabel]];

// Present the focus view
[self.focusView focus:someView, anotherView, nil];

Please see the sample app for an example.

Features

  • Because MDCFocusView uses MDCFocalPointView to wrap focal points, it is highly extensible--to create your own focus effect, simply subclass MDCFocalPointView and implement any custom drawing behavior in drawRect:. Please see MDCSpotlightView for an example.

Limitations (or Ways to Contribute to this Project)

  • Currently MDCFocusView can only be applied to the entire application window. Ideally, any arbirary view should be able to add MDCFocusView as a subview.
  • Currently only MDCFocalPointView and MDCSpotlightView are available, although I would like to make more. It would be nice, for example, if a Gaussian blur could be applied everywhere but the focal points.
  • See the GitHub issues for more bugs/feature requests you can help with.

mdcfocusview's People

Contributors

modocache avatar

Watchers

James Cloos avatar Vinod Vishwakarma 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.