9
W moim kodu w Swift:typu „string” nie jest zgodny z protokołem NilLiteralConvertible
override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
let stringIdent = String(format: "section_1_%d", section)
return NSLocalizedString(stringIdent, comment: nil)
}
Ja pokazany błąd podczas uruchamiania produkcji:
typu „string” nie spełnia wymogów protokół NilLiteralConvertible
Ten kod zawsze działał w Objective-C.
Co może być nie tak w Swift?