Skip to content

Instantly share code, notes, and snippets.

@nevyn
Created December 2, 2015 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nevyn/33077a013bb40c45cc5f to your computer and use it in GitHub Desktop.
Save nevyn/33077a013bb40c45cc5f to your computer and use it in GitHub Desktop.
import <UIKit/UIKit.h>
@interface UIControl (GFNextResponder)
@property(nonatomic, unsafe_unretained) IBOutlet UIControl *gf_nextResponder;
@end
#import "UIControl+nextResponder.h"
#import <objc/runtime.h>
@implementation UIControl (GFNextResponder)
- (UIControl*)gf_nextResponder
{
return objc_getAssociatedObject(self, "gf_nextResponder");
}
- (void)setGf_nextResponder:(UIControl *)gf_nextResponder
{
objc_setAssociatedObject(self, "gf_nextResponder", gf_nextResponder, OBJC_ASSOCIATION_ASSIGN);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment