Load different views depending on the category of data on tap of tableview cell iPhone sdk

Posted by neha on Stack Overflow See other posts from Stack Overflow or by neha
Published on 2010-05-19T08:31:14Z Indexed on 2010/05/19 9:50 UTC
Read the original article Hit count: 238

Hi all,

In my aplication, I want a tableview with different cell structure depending upon the category of data that's getting loaded in it [I have different categories like video, editorial etc with different structure of data like video has a single label, editorial has 3 labels etc]. I can load different nib files based on the data coming from xml parser.

Now when the cell is tapped, I want to show its detailed view on a new viewController. So my question is is it possible to use only 1 viewController show different fields depending upon the category of data in the cell. Or do I need to create different viewControllers for each of the categories?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk