SWIFT
UITextField.appearance().tintColor = UIColor.xFB7F4
UITextView.appearance().tintColor = UIColor.xFB7F4F
OC
[[UITextField appearance] setTintColor:[UIColor blackColor]];
[[UITextView appearance] setTintColor:[UIColor blackColor]];
本文介绍如何在Swift与Objective-C中为UITextField和UITextView设置颜色,通过修改外观属性实现统一的界面风格。
SWIFT
UITextField.appearance().tintColor = UIColor.xFB7F4
UITextView.appearance().tintColor = UIColor.xFB7F4F
OC
[[UITextField appearance] setTintColor:[UIColor blackColor]];
[[UITextView appearance] setTintColor:[UIColor blackColor]];
3919

被折叠的 条评论
为什么被折叠?