NSIndexPath *indexPath = [NSIndexPath indexPathForRow:10 inSection:0];
ClassRoomStyle2Cell *cell = [self.tableView cellForRowAtIndexPath:_selectIndex];
有时候会出现cell获取为空的情况,是因为获取的指定cell必须已经显示在当前页面上了,也就是说已经被tableView创建了。
如果还没被创建建议先调用
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
使tableView滚动到指定位置。