Notification监听cell

2017-11-06  本文已影响0人  frola_
- (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);
        }
    }
}
上一篇 下一篇

猜你喜欢

热点阅读