• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to change UITableView cell style dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to change UITableView cell style dynamically
      • From: Tharindu Madushanka <email@hidden>
  • Prev by Date: Re: Best approach to write an uninstaller for osx
  • Next by Date: Re: How to change UITableView cell style dynamically
  • Previous by thread: NSFetchedResultsController with fetch predicate
  • Next by thread: Re: How to change UITableView cell style dynamically
  • Index(es):
    • Date
    • Thread