How to change UITableView cell style dynamically
How to change UITableView cell style dynamically
- Subject: How to change UITableView cell style dynamically
- From: Tharindu Madushanka <email@hidden>
- Date: Sat, 21 Nov 2009 14:12:56 +0530
Hi
I am trying to create a table with a single cell like in Contacts
Application top one. What I want is change the cell style time to time. But
changing the style does not work even I call [tableview reloadData] it seems
like cell style is not changing
I want to switch between Default cell style and Subtitle style according to
user input in next screen.
currently I am doing something like this in tableview:
cellForRowAtIndexPath: delegate method.
UITableViewCellStyle style;
if(profile.name.length > 0) {
style = UITableViewCellStyleSubview;
} else {
style = UITableViewCellStyleDefault;
}
But it seems like detailTextLabel is not added to the cell later when I
change the profile name and reload the table view. Is there any other way to
do what I am trying to do here.
Thank you,
Tharindu
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden