Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

Commit

Permalink
Update UITextField+LimitLength.m
Browse files Browse the repository at this point in the history
  • Loading branch information
suxinde2009 committed Apr 9, 2013
1 parent 62957ba commit 3070849
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions TextLengthLimitDemo/UITextField+LimitLength.m
Expand Up @@ -10,11 +10,10 @@
#import <objc/objc.h>
#import <objc/runtime.h>

static NSString *kLimitTextLengthKey = @"kLimitTextLengthKey";

@implementation UITextField (LimitLength)

static NSString *kLimitTextLengthKey = @"kLimitTextLengthKey";

- (void)limitTextLength:(int)length
{
objc_setAssociatedObject(self, (const void *)(kLimitTextLengthKey), [NSNumber numberWithInt:length], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
Expand Down

0 comments on commit 3070849

Please sign in to comment.