美文网首页
Notification监听cell

Notification监听cell

作者: frola_ | 来源:发表于2017-11-06 11:51 被阅读0次
- (void)notificationdo: (NSNotification *) sender{

    if ([sender.object isKindOfClass:[UITextView class]]) {
        UITextView * textView = (UITextView *) sender.object;
   
        if (self.type == StateTypeException) {
            //遍历所有的cell,返回所有可见行的路径
            NSArray * array = self.tableView.indexPathsForVisibleRows;
            
            for (NSIndexPath * path in array) {
                
                JMEAttendanceNewStyleCell *cell =  [self.tableView cellForRowAtIndexPath:path];//
                if (sender.object == cell.textView1) {
                    //输入key=indexpath.row
                    if (self.type == StateTypeException) {
                        [_beizhuDetail setValue:textView.text forKey:[NSString stringWithFormat:@"@%ld",path.row]];
                    }
                }
            }
         }else{
            if (![self.inputString isEqualToString:self.otherInfo]) {
                self.showWarning      = YES;
            }
            NSLog(@"------%@",self.inputString);
        }
    }
}

相关文章

网友评论

      本文标题:Notification监听cell

      本文链接:https://www.haomeiwen.com/subject/eotlmxtx.html