Commit 2811661f0f45231a6e8ff31b3ead037869f2df97

Authored by 梁星国
1 parent d15b3000

提交0.0.15

CNLiveOrganizationValidationModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveOrganizationValidationModule'
11   - s.version = '0.0.14'
  11 + s.version = '0.0.15'
12 12 s.summary = '机构认证模块'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.m
... ... @@ -184,16 +184,20 @@
184 184  
185 185 #pragma mark - ***监听实现***
186 186 - (void)cnLiveBTextFieldTextDidChange:(NSNotification *)notification{
187   - CNLiveBOrganizationTextField *textField = (CNLiveBOrganizationTextField *)notification.object;
188   - if (textField) {
189   - if (textField.contentLengthMax == 0) {
190   - textField.contentLengthMax = 100;
191   - }
192   - if (textField.text.length > textField.contentLengthMax) {
193   - NSRange range = NSMakeRange(0, textField.contentLengthMax);
194   - textField.text = [textField.text substringWithRange:range];
  187 + if ([notification.object isKindOfClass:[CNLiveBOrganizationTextField class]]) {
  188 + CNLiveBOrganizationTextField *textField = (CNLiveBOrganizationTextField *)notification.object;
  189 + if (textField) {
  190 + if (textField.contentLengthMax == 0) {
  191 + textField.contentLengthMax = 100;
  192 + }
  193 + if (textField.text.length > textField.contentLengthMax) {
  194 + NSRange range = NSMakeRange(0, textField.contentLengthMax);
  195 + textField.text = [textField.text substringWithRange:range];
  196 + }
195 197 }
  198 +
196 199 }
  200 +
197 201  
198 202 }
199 203  
... ... @@ -378,16 +382,20 @@
378 382  
379 383 #pragma mark - ***监听实现***
380 384 - (void)cnliveBTextViewTextChange:(NSNotification *)notification{
381   - CNLiveBOrganizationTextView *textView = (CNLiveBOrganizationTextView *)notification.object;
382   - if (textView) {
383   - if (textView.contentLengthMax == 0) {
384   - textView.contentLengthMax = 400;
385   - }
386   - if (textView.text.length > textView.contentLengthMax) {
387   - NSRange range = NSMakeRange(0, textView.contentLengthMax);
388   - textView.text = [textView.text substringWithRange:range];
  385 + if ([notification.object isKindOfClass:[CNLiveBOrganizationTextView class]]) {
  386 + CNLiveBOrganizationTextView *textView = (CNLiveBOrganizationTextView *)notification.object;
  387 + if (textView) {
  388 + if (textView.contentLengthMax == 0) {
  389 + textView.contentLengthMax = 400;
  390 + }
  391 + if (textView.text.length > textView.contentLengthMax) {
  392 + NSRange range = NSMakeRange(0, textView.contentLengthMax);
  393 + textView.text = [textView.text substringWithRange:range];
  394 + }
389 395 }
  396 +
390 397 }
  398 +
391 399  
392 400 }
393 401  
... ...