If you have 2 different styles of cells then you should have 2 different reuse identifiers. Then when you dequeue, you ask for an available cell of the apropeiate type.

Luke

Sent from my iPhone.

On Nov 21, 2009, at 1:55 AM, Tharindu Madushanka <tharindu...@gmail.com> wrote:

Hi

Removing reuse identifier solved the problem so now I am creating a cell
like below. It worked.

UITableViewCellStyle style;
if(profile.name.length > 0) {
   style = UITableViewCellStyleSubview;
} else {
   style = UITableViewCellStyleDefault;
}

UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:style
reuseIdentifier:nil]autorelease];

No reuse identifiers or dequeue method in table view is not used while
creating cells

Since its only once cell, doing this is ok ? is it ?

-Tharindu
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to luket...@apple.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to