Welcome, Guest
Username Password: Remember me

Placeholder text instead of label
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Placeholder text instead of label

Placeholder text instead of label 1 year, 7 months ago #1

Hello again,
I would like to request an option that would set the placeholder property of a text field instead of the cell label and make the text field the full width of the cell.

Thank you!
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3

Re: Placeholder text instead of label 1 year, 7 months ago #2

Hi Karl,

If you don't set a label for an SCTextField cell, Sensible TableView will automatically have the text field take the whole cell width. Is that what you need?
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Placeholder text instead of label 1 year, 7 months ago #3

Okay I see how to do it now:
[myclassdef propertyDefinitionWithName:@"firstName"].attributes = 
[SCTextFieldAttributes attributesWithPlaceholder:@"enter your first name"];


If that wasn't possible I was hoping for something like this:

SCClassDefinition *myclassdef = 
[[SCClassDefinition alloc] initWithClass:[myclass class]
withPropertyNames:[NSArray arrayWithObjects:@"firstName", /*etc.,*/ nil]
withPropertyTitles:[NSArray arrayWithObjects:@"enter your first name", /*...,*/ nil]
usePropertyTitleForPlaceholderTextInsteadOfLabel:YES];



Thanks!!
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3

Re: Placeholder text instead of label 1 year, 7 months ago #4

Oh I get what you mean, and I think it's a really nice idea!

We should probably implement this as a BOOL property of SCTextFieldAttributes and call it "displayTitleAsPlaceholder". What do you think?
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Placeholder text instead of label 1 year, 7 months ago #5

If anyone else would find that a useful feature, then sure!
However, I'm okay with using attributes.

Thanks again!
  • kamanova
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 3
  • Page:
  • 1
Time to create page: 0.85 seconds