Code Monkey home page Code Monkey logo

justtian / emhint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcconkiee/emhint

0.0 2.0 0.0 632 KB

EMHint is an iOS class group that easily adds a spotlight-like effect to a view highlighting or hinting at something that may be important on the screen.The protocols of EMHintDelegate allow users to override many of the default actions and views. Tapping the black overlay fades it away. Great for quick "how to" or tutorials in your app.

License: MIT License

emhint's Introduction

EMHint

Overview

EMHint is an iOS class group that easily adds multiple spotlight-like effects to a view highlighting or hinting at some things that may be important on the screen.The protocols of EMHintDelegate allow users to override many of the default actions and views. Tapping the black overlay fades it away.

Great for quick "how to" or tutorials in your app.

Installation

  1. Drop in EMHint (.h/.m) & EMHintsView (.h/.m)
  2. Pick a logical place to manage EMHintDelegate protocol implementation and conform to <EMHintDelegate> .
  3. #import "EMHint.h"
  4. Call a new hint using the instance method presentModalMessage:(NSString*)message where:(UIView*)presentationPlace
  5. You must implement (CGRect)hintStateRectToHint:(id)hintState OR -(UIView*)hintStateViewToHint:(id)hintState - without one, you will throw an exception. By doing so, EMHint can understand the radius of the spotlight to draw, and where-abouts.

See the example app (HintMakerExample)in this build for more.

Tips

  1. It's possible to "daisy chain" hints. See the HintHelper.m class for a quick overview of using enums and protocol methods
  2. Custom views can be added inplace of the default white text. Useful if you need to add a view or label not at center, or any custom graphics, etc
  3. return CGRectMake(0,0,1,1) for an all black bg without spotlight….CGRectZero will fail.
  4. Not ARC compliant….later.

Todo's (limitations)

  1. add rectangular spotlight (and other shapes)
  2. different background colors/alpha/etc
  3. support rotation (currently only label and background do so)

emhint's People

Contributors

mcconkiee avatar luugiathuy avatar

Watchers

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