views:

245

answers:

1

Hi Out there,

my app looks like this

UINavigationController with UITableViewcontroller as RootViewController.

feedsTableViewController = [[ablogFeedsTableViewController alloc] initWithStyle:UITableViewStylePlain];
feedsNavigationController = [[UINavigationController alloc] initWithRootViewController:feedsTableViewController];
feedsNavigationController.delegate = feedsTableViewController;

in my viewcontroller method didSelectRowAtIndexPath im calling another tableview controller like this:

ablogSingleCatTableViewController *singleCatTableViewController = [[ablogSingleCatTableViewController alloc] initWithStyle:UITableViewStylePlain category:[categories objectAtIndex:indexPath.row]];
[[self navigationController] pushViewController:singleCatTableViewController animated:YES];
[singleCatTableViewController release];

this works fine.

now in this pushed UITableView i try to push a UIView, but this does not work.

postView = [[ablogPostView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
[[self navigationController] pushViewController:postView animated:YES];
[postView release];

i think the problem is at [self navigationController] because the delegate of this navigationController is in my other UITableViewController.

anybode can help me, how to solve this problem?

+1  A: 

You shouldn't push several viewControllers with an animation. Only the last push should be animated.

Also: it appears that you are trying to push a UIView subclass onto the navigationController. This won't work and you should have seen a warning. You can only push ViewControllers onto the stack.

Felix
ah okay. i really created a uiView instead of a UIViewController.I still have problems with the difference of ViewController and View. Why shoudn't i animate only the last one?
choise
That should be a new question. But a view is an object that describes presentation, but has no idea of how to be pushed around on a navigation controller.
Jonathan Sterling
If you push two viewControllers with an animation the navigationController messes up the animation and titles and you will get weird effects when trying to pop back.
Felix