views:

26

answers:

2

Hi all! in my program I need a tableview and, when you click onto a row, the view scroll left and show the details (like the mail for example...) how can I do this?? I explain... it's an automatic thing or I need to manage by hand the animation of the view?? thanks in advance

+1  A: 

Your case is exactly what UINavigationController class is for - it will handle your controllers hierarchy and will do animated transition for you as well. To learn how to use it you can have a look at Apple's NavBar sample.

Vladimir
thanks very much!
ghiboz
+1  A: 

I use UINavigationControllers to achieve this effect of the detail animating left when you click on the row. So you need a UINavigation controller above the UIViewController or UITableView Controller that controls your table.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

{
...my code

[self.navigationController pushViewController:myViewController animated:YES];

}

Robert Redmond
thanks robert but now I have my UIViewController class that shows the rows, so I need to add where the UINavigation?thanks
ghiboz
You create a UINavigationController in your app delegate and then add your UIViewcontroller to it. See the Navbar example in the other guy's answer.
Robert Redmond