Skip to content

Instantly share code, notes, and snippets.

@mjjimenez
Created October 24, 2013 07:01
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 mjjimenez/7132551 to your computer and use it in GitHub Desktop.
Save mjjimenez/7132551 to your computer and use it in GitHub Desktop.
#import <UIKit/UIKit.h>
@interface PRLabel : UILabel
@property (strong, nonatomic, readwrite) UIView* inputView;
@property (strong, nonatomic, readwrite) UIView* inputAccessoryView;
@end
#import "PRLabel.h"
@implementation PRLabel
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}
- (BOOL)isUserInteractionEnabled
{
return YES;
}
- (BOOL)canBecomeFirstResponder
{
return YES;
}
# pragma mark - UIResponder overrides
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[self becomeFirstResponder];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment