Welcome, Guest
Username Password: Remember me

UITableViewCellStyleSubtitle
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: UITableViewCellStyleSubtitle

UITableViewCellStyleSubtitle 1 year, 4 months ago #1

Hi Tarek,

Do you intend to add the UITableViewCell with the subtitle style?
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: UITableViewCellStyleSubtitle 1 year, 4 months ago #2

Hi Gary,

All STV cells are of style UITableViewCellStyleSubtitle. Just normally set their detailLabel.text property to your subtitle text.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: UITableViewCellStyleSubtitle 1 year, 2 months ago #3

I have a follow on question Tarek.

In the code below, I'd like "name" to be the main cell and "trans" to be the subtitle cell. These are being pulled as objects from a database..

Can you give me an example of how to define these..

Thanks again.

SCClassDefinition *sFutureDef = [SCClassDefinition definitionWithEntityName:@"SimpleEntity" withManagedObjectContext:self.managedObjectContext
withPropertyNames:[NSArray arrayWithObjects:@"name", @"trans", @"...", @"...", nil]];
 

Re: UITableViewCellStyleSubtitle 1 year, 2 months ago #4

Hi David,

All you need to do is set your class definition's "descriptionPropertyName" property:

 
...
sFutureDef.descriptionPropertyName = @"trans";
...
 


Hope this helps.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.51 seconds