views:

1975

answers:

2

I have a table view setup which currently, when being flickered up, has its sections flush up against right underneath the status bar, instead of flushing against the the navigation bar. I'm not sure if this is the proper behavior, but most applications have the Section Title flush properly below the navigation bar when it's slid into view.

What's the right way to correct this instead of downsizing the tableView arbitrarily?

* EDIT *

Related to a thread I created in http://stackoverflow.com/questions/321522/iphone-devel-broken-cell-with-an-odd-strikethrough. This problem plus the 'cell strike-through' problem occurs when I set my Navigation Bar to a Translucent Black. When it's Black Opaque or Normal, such a problem does not exist. I'm not sure if that's a result of something else in my code or an issue with the SDK.

+3  A: 

Sounds like you either don't have the bounds set properly in IB, or your springs-and-struts aren't correct. Is this the top level of the UIViewController, or a subview? Are you using a UINavigationController? If you test the interface in IB, does it look okay?

Ben Gottlieb
Hi Ben, my NIB looks like the following: http://dl-client.getdropbox.com/u/57676/controller.png. I do have a UINavigationController that sits in MainWindow.NIB with its root controller set there. All I did was add a tableView to my view, a UINavigationItem, and was hoping it would work.
Coocoo4Cocoa
Is there anything proprietary in there? If you want, you can send me the code (ben at standalone dot com) and I'll take a look at it; the image of the nib file doesn't help a lot, alas.
Ben Gottlieb
Probably better to either post the code here, or, if it's too long, some other site and refer to it from here. This way we can all contribute.
Outlaw Programmer
A: 

As I indicated in the other post, I suspect the hierarchy of views under the UINavigationController has become disrupted.

The layoutSubviews in the content view (which contains the navigation bar and your UITableView) of the UINavigationController should be sizing the UITableView such that it doesn't overlap the navigation bar. In your case, I'm guessing that either the UITableView is resizing itself afterwards or the layoutSubviews doesn't know about the UITableView for some reason and the UITableView is passing underneath the navigation bar, causing the alignment issue you are seeing.

Matt Gallagher