UA-17470720-3

Jump to content


Photo
- - - - -

Clear button


  • Please log in to reply
5 replies to this topic

#1 Karl1348790294

Karl1348790294

    Experienced Member

  • STV 5.0 Std
  • PipPipPipPip
  • 90 posts
Reputation: 6
Good

Posted 04 September 2015 - 09:57 AM

Would it be possible to add a setting for the clear button of a textfield on the field properties settings.

thanks

karl



#2 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 04 September 2015 - 03:15 PM

you can.. either by code.. or in IB

 

Attached File  Screen Shot 2015-09-05 at 9.10.47 am.png   89.63K   12 downloads

 

    cell.cellActions.willDisplay = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
    {
        SCTextFieldCell *c = (SCTextFieldCell*)cell;
        c.textField.clearButtonMode = UITextFieldViewModeWhileEditing; //or any of the other options
    };

Edited by ozie, 04 September 2015 - 03:18 PM.

  • Tarek likes this

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#3 Karl1348790294

Karl1348790294

    Experienced Member

  • STV 5.0 Std
  • PipPipPipPip
  • 90 posts
Reputation: 6
Good

Posted 07 September 2015 - 11:06 AM

Thanks, but I have tried setting this in IB and STV seems to ignore the setting.

karl



#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 08 September 2015 - 01:23 PM

Hi Karl,

 

That's very strange. I just tried it in our bundled TasksApp sample and it seems to be working (please see attached).

 

Attached File  ClearButton.png   82K   8 downloads



#5 Karl1348790294

Karl1348790294

    Experienced Member

  • STV 5.0 Std
  • PipPipPipPip
  • 90 posts
Reputation: 6
Good

Posted 09 September 2015 - 03:53 AM

I am using STV 4 lite

Does that make a difference?

karl



#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 10 September 2015 - 07:37 AM

That shouldn't make a difference at all.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users