views:

216

answers:

2

Hi, My problem is, I have table of names. And when I touch on each name, a new view should appear and image of corresponding name. For all the names only one view should be there and the image should change dynamically.

Thank You.

+1  A: 

Read Navigating a Data Hierarchy with Table Views in the Apple docs.

bpapa
+2  A: 

If you have a view controller with an UIImageView. Then I'd make the UIImageView a property:

@property (nonatomic, retain) UIImageView *myImageView;

Then in the didSelectCellAtIndexPath method for the tableview delegate, you set the image property to the image view depending on the cell selected.

myViewController.myImageView.image = [UIImage imageNamed:@"myImageName"];
kmcgrady