UA-17470720-3

Jump to content


Photo
- - - - -

Change the width of title


  • Please log in to reply
1 reply to this topic

#1 mbsedv

mbsedv

    Starting Out

  • STV 5.0 Pro
  • Pip
  • 1 posts
Reputation: 0
Neutral

Posted 26 July 2016 - 03:26 AM

we have the following code:

 

SCEntityDefinition *schadenDefinition =
    [SCEntityDefinition definitionWithEntityName:@"Leckortung" managedObjectContext:[appDelegate managedObjectContext]
                              propertyNames:[NSArray arrayWithObjects:  @"feuchtigkeitsmessungAnalog",
                                                 @"feuchtigkeitsmessungDigital",
                                                 @"feuchtigkeitsmessungDielektrizitaetsmessung",
                                                 @"feuchtigkeitsmessungTempFeuchtenmessgeraet",
                                                 @"feuchtigkeitsmessungChecked", nil]];
    
    [schadenDefinition propertyDefinitionWithName:@"feuchtigkeitsmessungAnalog"].title = @"Widerstandsmessung Analog";
    [schadenDefinition propertyDefinitionWithName:@"feuchtigkeitsmessungDigital"].title = @"Widerstandsmessung Digital";
    [schadenDefinition propertyDefinitionWithName:@"feuchtigkeitsmessungDielektrizitaetsmessung"].title = @"Dielektrizitätsmessung";
    [schadenDefinition propertyDefinitionWithName:@"feuchtigkeitsmessungTempFeuchtenmessgeraet"].title = @"Thermo-Hygrometer";
    
    [schadenDefinition propertyDefinitionWithName:@"feuchtigkeitsmessungChecked"].title = @"Eingabe vollständig";
    
    SCPropertyGroup *basicGroup = [SCPropertyGroup groupWithHeaderTitle:@"" footerTitle:@"" propertyNames:[NSArray arrayWithObjects:@"feuchtigkeitsmessungAnalog",
                                                                                                                   @"feuchtigkeitsmessungDigital",
                                                                                                                   @"feuchtigkeitsmessungDielektrizitaetsmessung",
                                                                                                                   @"feuchtigkeitsmessungTempFeuchtenmessgeraet",
                                                                                                                   nil]];
    [schadenDefinition.propertyGroups addGroup:basicGroup];

The view is like in the attachement. How can I let view all the title-text?

 

 

Attached Files



#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 26 July 2016 - 02:40 PM

Hi mbsedv,

 

You need to set the maxTextLabelWidth property to your preferred width. Here how your code might look like:

 

schadenDefinition.cellActions.willConfigure = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
{
  if([cell isKindOfClass:[SCControlCell class]])
  {
     SCControlCell *controlCell = (SCControlCell *)cell;
     controlCell.maxTextLabelWidth = 200;
  }
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users