大神们

    我有个问题,当我的cell使用注册方法注册时如:

    [self.tableView registerClass:[DemoVC7Cell class] forCellReuseIdentifier:NSStringFromClass([DemoVC7Cell class])];

    我在cellForRowAtIndexPath 方法代理里面 分别使用

   

- (nullable __kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier;
    和
    - (__kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath

    有什么区别?

    

    另外 老大在 这个函数里面明确说明了 不让使用 dequeueReusableCellWithIdentifier:forIndexPath

 

- (NSNumber *)heightCacheForIndexPath:(NSIndexPath *)indexPath
    {
        /*

         如果程序卡在了这里很可能是由于你用了“dequeueReusableCellWithIdentifier:forIndexPath:”方法来重用cell,换成

““dequeueReusableCellWithIdentifier:”(不带IndexPath)方法即可解决
         */
        NSString *cacheKey = [NSString stringWithFormat:@"%ld%ld", (long)indexPath.section, (long)indexPath.row];
        return (NSNumber *)[_cacheDictionary objectForKey:cacheKey];
    }

    为什么不让使用?求解答?