ios - 让 indexPath = NSIndexPath(forRow : 0, inSection: 0) 的替代方法

标签 ios swift xcode nsindexpath

<分区>

似乎在 xcode 8 中它不接受

let indexPath = NSIndexPath(forRow: 0, inSection: 0)

在 swift 3 中执行此操作的新方法是什么?

最佳答案

在 Swift 3 中:IndexPath(row: 0, section: 0)

关于ios - 让 indexPath = NSIndexPath(forRow : 0, inSection: 0) 的替代方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39229543/

相关文章:

ios - 使用 Storyboard/ Action

ios - Xcode 4.3.2 默认启动图像底部像素损坏

ios - UICollectionView 自动布局约束错误

ios - UIActivityViewController:如何获取事件是否完成

ios - 无法理解代码中没有相关方法的崩溃报告

ios - libc++abi.dylib : terminating with uncaught exception of type NSException 导致核心数据崩溃

ios - 项目从 git 编译但在 Xcode 6 中不是新的

Swift CollectionView 部分类别

ios - 即使提供布局后,UICollectionViewDelegateFlowLayout 也会出错

c++ - 与其他几个具有相同输入的编译器相比,在 Xcode 中编译的代码给出了不正确的(?)输入