Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface 更改文本选择颜色_User Interface_Ios6_Uitextview_Selection - Fatal编程技术网

User interface 更改文本选择颜色

User interface 更改文本选择颜色,user-interface,ios6,uitextview,selection,User Interface,Ios6,Uitextview,Selection,我怀疑在iOS 6中(特别是在UITextView中)无法更改文本选择(最好是句柄)颜色 但为了确定,我想问一下。谷歌搜索并没有给我带来任何有用的东西,所以如果有人有明确的答案,我很高兴听到。我想你可以这样做: UIColor *color = [UIColor blackColor]; textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholderText attributes

我怀疑在iOS 6中(特别是在
UITextView
中)无法更改文本选择(最好是句柄)颜色


但为了确定,我想问一下。谷歌搜索并没有给我带来任何有用的东西,所以如果有人有明确的答案,我很高兴听到。

我想你可以这样做:

 UIColor *color = [UIColor blackColor];
 textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholderText attributes:@{NSForegroundColorAttributeName: color}];

看不出来

谢谢你的回答,但我说的是
UITextView
,不是
UITextField
。此外,我希望在保留文本选择所需的所有内容(放大镜、手柄等)的同时更改选择颜色-这不是对文本的某些部分重新设置样式。