Does anyone know how to populate the picker controller with core data
I'm trying to populate the UIPicker with Core Data instead of an array but can't for the life of me figure out how to do it... Plea开发者_如何转开发se can someone point me in the right direction as to what I can do as I'm completely stuck...
Thanx a lot
Stef :-)
A similar post should help.
You can easily use core data to do a fetch in to an array, then use this array in the UIPickerView data source and delegate methods. Whether you need to fetch once, or for a changing search string say, is up to your application behaviour. You can't wire-up core data to UI elements like UIPickerView directly.
精彩评论