Multiple methods named 'count:' found with mismatched result, parameter type or attributes

来源:互联网 发布:外卖快餐软件 编辑:程序博客网 时间:2024/05/17 09:47

早上使用UICollectionView的DataSource协议方法 numberOfItemsInSection时,因为用了二位数组的常用调用方式从而一直报错。


翻译后得知:编译器找不到对应的count的合适方法,从而出现报错。只需要在函数前面转换一下类型就可以了,告诉编译器指定的地方,从而调用合适的方法。

     [(NSMutableArray *)self.dataColList[section]count];



0 0
原创粉丝点击