Add to your podfile
pod "TBTextViewWithCharLimit"
//Import
#import "TextViewWithCharLimit.h"
//Setup
@interface MyClass () <,TextViewWithCharLimitDelegate>
TextViewWithCharLimit *textField = TextViewWithCharLimit(frame: self.view.frame)
textField.myDelegate = self;
textField.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.2];
textField.charMax = 105;
textField.placeholderText = @"Empty field";
//Delegates
-(void)textViewWithCharLimit:(TextViewWithCharLimit *)textViewWithCharLimit shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
}
To run the example project, clone the repo, and run pod install
from the Example directory first.
IOS 8.0
TextViewWithCharLimit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "TBTextViewWithCharLimit"
thiagotmb, [email protected]
TextViewWithCharLimit is available under the MIT license. See the LICENSE file for more info.