Question

HTF?

i'm new to the iphone SDK. for a navigationbar and uitable (from the NIB) eg. an empty/new navigation-based app, what is the best way to change the height of the uinavigationbar without it clipping/overlapping the uitableview? i essentially just need to move the uitableview down and i've tried just about everything now.

Q1) is it best to use eg. navigationBar.frame = CGRectMake(0, 20, 320, 88); or should i be using navigationBar.bounds instead?

Q2) do you set tableView.bounds or .frame with CGRectMake? or is there something blatently obvious that i overlooked?

i've tried different autoresizingMask combos too

come on peoples! this should be easy. what am i doing wrong here?

Was it helpful?

Solution

UINavigation has a set size - it's not easy to change, and is likely to violate Apple's HIG if you do change it.

Aside from that, I'm not entirely sure what you're asking. Is the navigation bar obscuring the top of your table view? If that is the case, simply leave a 44px space above your table view. If that doesn't work, or your table view isn't embedded in another view, you can set the contentInset property on the table view to explicitly make space between the top of the table view's scroll view to the content within the table view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top