tags:

views:

47

answers:

1

I'm not sure if more code will be needed to help me troubleshoot this problem, let's try this first...

I have a navigation based app using core data. My rootViewController displays the first level of my data perfectly fine. When I push another instance of rootViewController (the first 2-3 levels of my data have exactly the same display parameters, so I just pass a predicate) I get a squeezed version of the view with black artifacts.

alt text

You can see the rounded corners, the black bg, etc. Also, the table doesn't take the entire width.

I tried this on the cells:

cell.backgroundColor = [UIColor clearColor];

Didn't change anything... the rounded corners also remind me of a grouped table view, but it clearly isn't because the first level of my navigation is the same rootViewController and it looks fine.

A: 

It's a stupid mistake but I'll post the fix to save someone else the trouble.

When allocating the UIViewController that is going to be pushed onto the navigation stack, use the proper initWithStyle property:

RootViewController *rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain];

What I had done was:

RootViewController *rootViewController = [[RootViewController alloc] initWithStyle: UITableViewCellStyleSubtitle];
Mike A