9
在我的代碼在斯威夫特:類型「串」不符合協議NilLiteralConvertible
override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
let stringIdent = String(format: "section_1_%d", section)
return NSLocalizedString(stringIdent, comment: nil)
}
我出運行的版本時出現錯誤:
類型「串」不符合協議NilLiteralConvertible
此代碼一直在Objective-C中工作。
Swift中可能出錯的是什麼?