- (nullable __kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier; // Used by the delegate to acquire an already allocated cell, in lieu of allocating a new one.
- (__kindof UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(6_0);
你应该想问如下两个方法的区别吧:
注意到老的接口,返回值可以为空。老的写法一般是:
而新的接口则不然,调用该方法后不用判空。(当然前提是之前调用过
registerClass
)