I am new to UITableView, so please don’t mind me asking the following silly question(s).
-
In the attached screenshot, the IB’s geometry does not match the geometry on the simulator – notice the white bar at the bottom of the screen in the simulator. What did I miss? The outlets for the TopLevelView, TableView and the DatePickerView are defined in the rootViewController.h file.
-
In the IB, I had set the background color of the TopLevelView to lightBlue; the background color of the tableView is set to ClearColor in the rootViewController.m file. But, the lightBlue color of the TopLevelView is not shown around the edges of the TableView.
[ivTableView setBackgroundColor:[UIColor clearColor]];
Regards, Sam
The “white bar at the bottom” problem suggests that you’ve got a view controller that doesn’t seem to know that it’s inside a navigation interface. You should show the code or otherwise describe how you’re assembling this interface, because there’s something wrong in how you’re doing it.
The root view controller of your entire interface, the one whose view appears as the sole immediate subview of the window, should be a UINavigationController. Its rootViewController should be the view controller that fetches this view from the nib. Beyond that it’s hard to help without knowing more about what you’re doing.
I suggest that you start with the Navigation template. Unfortunately its RootViewController is a UITableViewController, which isn’t going to work here because that’s only for the case where the table view occupies the entire interface. So turn the RootViewController into an ordinary UIViewController. Now in the RootViewController.xib design the interface you’ve drawn above. It should load properly, convincing you that you’re on the right track.