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.
- Drop in EMHint (.h/.m) & EMHintsView (.h/.m)
- Pick a logical place to manage EMHintDelegate protocol implementation and conform to
<EMHintDelegate>
. - #import "EMHint.h"
- Call a new hint using the instance method
presentModalMessage:(NSString*)message where:(UIView*)presentationPlace
- 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.
- It's possible to "daisy chain" hints. See the
HintHelper.m
class for a quick overview of using enums and protocol methods - 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
- return CGRectMake(0,0,1,1) for an all black bg without spotlight….CGRectZero will fail.
- Not ARC compliant….later.
- add rectangular spotlight (and other shapes)
- different background colors/alpha/etc
- support rotation (currently only label and background do so)