试了几种,都不可以:
for sectionIdx in [0…self.fileSectionList.count] { let curFileSectionItem:FileSectionItem = self.fileSectionList[sectionIdx] |
swift for in int
参考官网:
The Swift Programming Language (Swift 2.1): Control Flow
最后用:
for sectionIdx in 0…(self.fileSectionList.count–1) { let curFileSectionItem:FileSectionItem = self.fileSectionList[sectionIdx] |
即可.
转载请注明:在路上 » [已解决]swift中for循环int整数