因未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'无效的indexPath'

时间:2015-09-20 13:31:29

标签: swift2

斯威夫特2正在努力!

我改编了:

func addConstraints(format format: String, options: NSLayoutFormatOptions? = nil, metrics: [String: AnyObject]? = nil, views: [String: UIView]) {
    addConstraints(NSLayoutConstraint.constraintsWithVisualFormat(format, options: options!, metrics: metrics, views: views))
}

func addUniversalConstraints(format format: String, options: NSLayoutFormatOptions, metrics: [String: AnyObject]? = nil, views: [String: UIView]) {
    addConstraints(format: "H:\(format)", options: options, metrics: metrics, views: views)
    addConstraints(format: "V:\(format)", options: options, metrics: metrics, views: views)
}

虽然我在这一行没有错误

public func selectRowAtIndex(index: Index) {
    selectedRowIndex = index

    tableView.selectRowAtIndexPath(
        NSIndexPath(forRow: index, inSection: 0),
        animated: false,
    /**Error->*/    scrollPosition: .Middle)
}

再次感谢您的帮助。 :)

0 个答案:

没有答案