CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

NBVariableTargetAreaButton 1.0.0

NBVariableTargetAreaButton 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Josh Justice.



  • By
  • Josh Justice

Button that can detect taps a certain range outside of itself, useful for small buttons.

Demo

The demo/ folder contains a demo project showing NBVariableTargetAreaButton in use. Open and run it.

Usage

Just set the button.tapMargin to how many pixels outside the button you want a tap to be detected.

Compatibility

This class has been tested back to iOS 6.1.

Implementation

This class is implemented by overriding the following UIButton method:

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;

License

This code is released under the MIT License. See the LICENSE file for details.