Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
TextField.placeholder color
-
Is it possible to change the placeholder color ?
in my case its very dark so i can't read it very well... -
@DavinE try
from objc_util import * import ui tf = ui.TextField() t = 'test' tf.placeholder = t tf.present('sheet') @on_main_thread def x(): o = ObjCInstance(tf) stro=ObjCClass('NSMutableAttributedString').alloc().initWithString_(tf.placeholder) color = UIColor.colorWithRed_green_blue_alpha_(1, 0.7, 0.7, 1) stro.addAttribute_value_range_(ns('NSColor'),color,NSRange(0,len(t))) o.textField().setAttributedPlaceholder_(stro) #print(dir(o.textField())) x()
-
@cvp it works great thanks xD