I'm implementing a simple picker view in Swift. Everything is wired up and here's all the code I have so far:
//MARK: - picker data and delegates
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int
{
return 2
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return self.visableScores
}
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String!
{
return "\(row)"
}
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
{
}
visableScores
is an Int.
For some reason as soon as I try to scroll on the picker view the UI freezes and becomes barely responsive. I have never used a picker view. Am I doing something wrong or should I look elsewhere for why the UI is freezing?
It turns out that the simulator just needed to be restarted.
I quit the simulator, ran the project again, and everything was back to normal.
It's happened since then and now my default action for any weird behavior is to restart Xcode and the simulator.