TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by xoyip.
Download these files from this repo, then import to your project.
Classes/CFPressHoldButton.h
Classes/CFPressHoldButton.m
Inherits CFPressHoldButtonDelegate
on your view controller.
// ViewController.h
#import <UIView+CFPressHoldButton.h>
@interface ViewController : UITableViewController<CFPressHoldButtonDelegate>
@end
Set delegate object.
// ViewController.m
- (void)viewDidLoad
{
UIView *pressHoldButton = // create view;
pressHoldbutton.delegate = self;
}
Implements delegate methods.
- (void)didStartHolding:(UIView *)targetView
{
NSLog(@"do something on starting");
}
- (void)didFinishHolding:(UIView *)targetView
{
NSLog(@"do something on finishing");
}