Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 24', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Building the Editing Controllers 199 Create a date formatter to format the date from the picker NSDateFormatter df NSDateFormatter alloc init df setDateStyle NSDateFormatterLongStyle df stringFromDate df release return cell EditDateController. m You can see that you are once again using an NSDateFormatter to convert the NSDate object into a string for display in the TableViewCell. In the dealloc method release the member variables that correspond to the class properties void dealloc managedTaskObject release downtoadon managedObjectContext release datePicker release tv release super dealloc Finishing Up the Editing Controllers You have now finished implementing all of the edit controllers. The last thing that you need to do before you are ready to run the program is go back and add code to the to use the new subcontrollers to edit the task data. In add an import statement for each subcontroller Available lor download on import import import import You will also need to add an import for the App delegate because you need to get a reference to the managedObjectModel in order to use your stored fetch request import You can now implement the didSelectRowAtIndexPath method that you left out when you were implementing the ViewTaskController earlier in the chapter. This method runs when a user selects a row in the table. The method should display the correct edit View Controller based on which row the user selects. 200 I CHAPTER 7 BUILDING A CORE DATA APPLICATION The last two buttons in the table do not use edit View Controllers. The Hi-Pri Tasks button demonstrates how to use a fetched property to get a list of high-priority tasks. The Tasks due sooner button shows you how to use a stored fetch request. The following is the code for .