I have a modal view controller that I put onto screen using presentModalViewController:animated. This particular view controller, an instance of UIViewController, has a UITableView and cells with further detailAccessory options. Clicking on a date row should allow a controller with UIDatePicker to populate on the screen. The problem is this:
- You cannot put two modal views onto screen at once.
- Because of constraint #1, I have to use
UINavigationControllerandpushViewController:animated:. What this does is push my controller with aUIDatePickeron top of the stack, but physically BELOW my modal view controller.
Does this imply that my modal view controller needs its own UINavigationController? What’s the best bet to go about this?
If I’m reading this correctly you are
If you want to present a new UINavigationController modally, you can. A good example of that is the People Picker.
I think it may be easier to just slide in a a UIDatePicker from the bottom on your modal view when the user performs the action. That would eliminate the need to push in a new view controller, but you would need to resize the table view to accommodate the showing/hiding of the date picker.