views:

543

answers:

1

I'm diving into iPhone OS development on the iPad and one of the things I'm playing with is the SplitView template. The template provides a window with a UISplitView view, containing the Root View (on the left of the window) and the Detail View (on the right of the window). The Root View is a subclass of a TableView. Rather than having the entire Root View consist of a TableView, I'd like it to contain a DatePicker view along with the TableView under it. When I go into IB and try and drop a DatePicker into the Root View, it won't let me. It will only let me add a DatePicker view to the Detail View.

  1. Why wont IB let me drop a DatePicker view into the Root View?
  2. How can I add a DatePicker to the RootView in addition to the TableView?

I'm still learning this new platform, so I apologize if these questions are absurd in any way. Thanks so much in advance for your help, I'm going to continue researching these questions right now.

+1  A: 

Why wont IB let me drop a DatePicker view into the Root View?

For starters, RootViewController is a UITableView. You can't add a UIDatePicker to a UITableView.

How can I add a DatePicker to the RootView in addition to the TableView?

If you want to add a UIDatePicker, you have to replace RootViewController with a UIViewController then add a UITableView and UIDatePicker.

Jordan
Thanks, Jordan, that makes sense. I removed the RootViewController and dropped in a UIViewController. That allowed me to add either a UITableView or a UIDatePicker, but not both. Does that sound right or am I still missing something?
BeachRunnerJoe
Nevermind, I figured it out. Thanks again!
BeachRunnerJoe