Use data from NSUserDefaults in UIPickerView - pickerView stays empty
问题 I tried to set up NSUserDefaults last night but an error keeps occurring: ViewController3: save data @IBAction func tappedAddButton(sender: AnyObject) { var userDefaults:NSUserDefaults = NSUserDefaults.standardUserDefaults() var exercisesList:NSMutableArray? = userDefaults.objectForKey("exercisesList") as? NSMutableArray var dataSet:NSMutableDictionary = NSMutableDictionary() dataSet.setObject(textField.text, forKey: "exercises") if ((exercisesList) != nil){ var newMutableList:NSMutableArray