Greg
Greg

Reputation: 34798

how do arrange for a uitableviewcell to launch another datepicker view to select the date?

how do arrange for a uitableviewcell to launch another datepicker view to select the date?

So I want one of my tableviewcell's to be displaying a date, but if the user wants to edit the date they click on this cell (in the tableview) and it will pop another view up with a date picker. After the user picks a date from this separate view they come back to the table view and the cell will be updated with the date picked.

For example: would it be something like:

Upvotes: 1

Views: 850

Answers (1)

Yasser
Yasser

Reputation: 1808

Here is one idea: embed the UITableView and DatePicker on the same UIView in interfacebuilder. Initially set the size of the UITableView to its container, so DatePicker is pushed out of visible area. When user touches a cell, change the coordinates of the UITableView and datepicker such that UITableView shrinks and datepicker slides up. You can animate this transition using UIAnimation. After the date has been picked, you can do the opposite animation and set the cell appropriately.

Upvotes: 2

Related Questions