0

i have 2 controllers .one controller is view controller and the other controller is tableview controller.in the view controller their is a datepicker .when i select a particular time from the date time picker and click on the navigation bar back button the time value must be displayed on my cell.detailtexlabel of my tableview controller.Please help me in solving this problem.Thanks

Rocky
  • 1,427
  • 1
  • 28
  • 65

1 Answers1

0

This would be a good time to use delegates. You would write a custom delegate protocol and have your tableview implement it. When you create your view with the datepicker, set a delegate property on it to point back to the UITableView subclass. Then call one of the delegate methods when the date needs to be stored.

This is a common design pattern for UITableViews, see Apple's documentation.

Community
  • 1
  • 1
Evan Cordell
  • 4,108
  • 2
  • 31
  • 47