2

With iOS 7 Apple suggest to use UIDatePicker and UIPickerView inline within UITableViewCell as showed here: iOS 7 - How to display a date picker in place in a table view?

I have a table view with N rows dynamically allocated. Each row represent an object fetched from Core Data. What I want is display an UIPickerView just below each row the user tapped in to let user select in a range of values.

I've thought to adopt Apple's way and insert an UIPickerView every 2 rows but this it's pretty weird and causes some issues. How can I 'follow' the normal succession for retrieving each object from my main NSArray _list which contains each object fetched from Core Data?

Is there a 'better' way to implement this without having to insert tons of UIPickerView?

This is an image which explains better, I hope.

enter image description here

Community
  • 1
  • 1
Fred Collins
  • 5,004
  • 14
  • 62
  • 111

1 Answers1

1

Take a good look at the sample code you linked to. You don't insert a picker every other row. There is one picker that appears just below the input row you're editing. The picker only appears during editing.

After you read their code, maybe you could ask a more specific question...?

DaiMaoTsai
  • 304
  • 2
  • 7