Cell Dequeue problem when table inside another table's cell content view

Posted by Shailesh Kanzariya on Stack Overflow See other posts from Stack Overflow or by Shailesh Kanzariya
Published on 2010-03-09T07:32:27Z Indexed on 2010/03/09 7:36 UTC
Read the original article Hit count: 228

I am using two table views (Main Table and Sub Table), one table inside other's cell. I am adding Sub Table in Main Table's cell content view. I am also using different Cell Identifier for both table cells.

Now, issue is : When - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

is called, very first time cell of Main Table is generated and when I scroll up/down they all are just dequeued, so it is expected and standard behavior and working fine. But, cell of Sub Table is getting created/allocated every time. It is not dequeued as it should be. I guess, its happening because Sub Table is part of Main Table's Cell Content view. But not sure and don't know how to resolve it. Can somebody help me to find the solution?

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about iphone-sdk-3.0