0
テーブルのセクションをリロードしようとしている箇所の下の4行目にエラーが表示されます。私もNSMakeRange([indexPath.section], 1)
を使ってみましたが、同じエラーが続いています。コンテキストタイプNSIndexSetをSwift 2.xの配列リテラルで使用することはできません
テーブルのセクションをリロードしようとしている箇所の下の4行目にエラーが表示されます。私もNSMakeRange([indexPath.section], 1)
を使ってみましたが、同じエラーが続いています。コンテキストタイプNSIndexSetをSwift 2.xの配列リテラルで使用することはできません
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if (indexPath.section == 1) {
isSectionSelected = true
self.tableView.reloadSections([indexPath.section], withRowAnimation: .None)
self.performSegueWithIdentifier("serviceHistoryDetailView", sender: self)
}
tableView.deselectRowAtIndexPath(indexPath, animated: true)
}
reloadSections
はInt
のNSIndexSet
、ない配列を期待します。
NSIndexSet
をindexPath.section
から作成する必要があります。その後、配列ではなくNSIndexSet
を渡します。
これは簡単でした。ありがとう! – Jace