1

I am working on an iPhone/iPad App that is using core data. I have a Table (Entity) that wants the user to select from another Table (relationship is setup in the model). I have worked through several tutorials, and it is working very well. Select one of the second table items, save the record. When I re-edit the record the correct value is properly showing. Great (since I am very new to this, I love how some of this works!).

However, if I click to bring up the Picker again - it defaults back to the top of the list, rather than the previously selected second record. All examples I could find have something in the Picker Class on viewDidLoad to set the selected row - to an integer? How would I know what row to select, since this is a table - not an array of fixed values?

MPelletier
  • 16,256
  • 15
  • 86
  • 137
  • int iCount = 0; defaultPickerRow = 0; for (id* coreDataRecord in ArrayOfMngObjForPicker) { if (coreDataRecord.entity = savedNSUserDefValue) defaultPickerRow = iCount; iCount++ } – PhillipOReilly Sep 06 '14 at 04:16

0 Answers0