• Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 12 years ago
  • Updated almost 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

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)