rrr*_*abu 1 uicollectionview swift3
我有以下代码段,用于收集视图类别。
func indexPathForCategory(category: Category) -> NSIndexPath
{
let section = sections.index(of: category.section)
var item = 0
for (index, currentCategory) in categoriesForSection(index: section!).enumerated() {
if currentCategory === category {
item = index
break
}
}
return NSIndexPath(forItem: item, inSection: section!)
}
Run Code Online (Sandbox Code Playgroud)
在return语句上,由于参数标签(forItem:,inSection :)与任何可用的重载都不匹配,因此出现错误。
| 归档时间: |
|
| 查看次数: |
1381 次 |
| 最近记录: |