We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一般有了placeholder的需求,往往也有个最多字符的需求,经过一番研究,也算解决了这个需求,代码贴出来,让这个类跟好点 -(void)DidChange:(NSNotification*)noti{
if (self.placeholder.length == 0 || [self.placeholder isEqualToString:@""]) { _PlaceholderLabel.hidden=YES; } if (self.text.length > 0) { _PlaceholderLabel.hidden=YES; } else{ _PlaceholderLabel.hidden=NO; } if (_eventBlock && self.text.length > self.maxTextLength) { void (^limint)(BRPlaceholderTextView*text) =_eventBlock; limint(self); } //解决限制字符的问题 if (!self.markedTextRange&&self.text.length>self.maxTextLength) { self.text=[self.text substringToIndex:self.maxTextLength]; }
}
The text was updated successfully, but these errors were encountered:
好的。。。。感谢
Sorry, something went wrong.
No branches or pull requests
一般有了placeholder的需求,往往也有个最多字符的需求,经过一番研究,也算解决了这个需求,代码贴出来,让这个类跟好点
-(void)DidChange:(NSNotification*)noti{
}
The text was updated successfully, but these errors were encountered: