2
수신 Value of type 'IndexSet' has no member 'enumerateIndexesUsingBlock'
에서 enumerateIndexesUsingBlock 오류가 발생했습니다.Swift 3.0 : 'IndexSet'유형의 값에 'enumerateIndexesUsingBlock'멤버가 없습니다.
/**
Extension for creating index paths from an index set
*/
extension IndexSet {
/**
- parameter section: The section for the created NSIndexPaths
- return: An array with NSIndexPaths
*/
func bs_indexPathsForSection(_ section: Int) -> [IndexPath] {
var indexPaths: [IndexPath] = []
self.enumerateIndexesUsingBlock { (index:Int, _) in
indexPaths.append(IndexPath(item: index, section: section));
}
return indexPaths
}
}
어떤 경우에 대한-에서 대신 블록의 사용? self.enumerated()의 (인덱스, 값)에 대한 >>> { print ("인덱스 = \ (인덱스), 값 = \ (값)") } – Che