What's new

Make a Detail view for a UITableView

pixelcab

iPF Noob
Hi guys,

I been looking for days into google to try to make this without luck.
I have a UITableView and I when the user tap over one cell I want to show the details in a new view. Seems very basic function but is making me crazy.

Any of you have an example of how to make this?

thanks!
 
but what kind of a view? standard popover with arrow? modal view? custom view?

anyway you have a method tableView:didSelectRowAtIndexPath: where you can present your view...
 
Hi,

you have to implement the following method of the table view

Code:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
in there you just build the Viewcontoller you want and push it to your navigationController. Something like this:

Code:
YourViewControllerClass *viewController = [[YourViewControllerClass alloc]initWithNibName:@"YourViewControllerXib" bundle:nil];
        [self.navigationController pushViewController:viewController animated:YES];        
        [viewController release];

Hope this helps
 

Most reactions

Latest posts

Back
Top