Я довольно новичок в кодировании в Swift, и я не слишком уверен, что здесь происходит - может ли кто-нибудь помочь?Неустранимая ошибка: неожиданно найден нуль при развертывании Необязательное значение - почему?
Благодаря
import UIKit
class SecondViewController: UIViewController {
var toDoItems:[String] = []
@IBOutlet weak var toDoItem: UITextField!
@IBAction func addItem(sender: AnyObject) {
toDoItems.append(toDoItem.text)
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
println(toDoItems)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Вы - рок-звезда !!! – Joker