my app looks like this
UINavigationController
with UITableViewcontroller
as RootViewController.
feedsTableViewController = [[ablogFeedsTableViewController alloc] initWithStyle:UITableViewStylePlain];
feedsNavigationController = [[UINavi开发者_StackOverflow中文版gationController 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?
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.
精彩评论