[[UITextField appearance] setTintColor:[UIColor RedColor]];//设置UITextField的光标颜色
[[UITextView appearance] setTintColor:[UIColor RedColor]];//设置UITextView的光标颜色
[[UITextField appearance] setTintColor:[UIColor RedColor]];//设置UITextField的光标颜色
[[UITextView appearance] setTintColor:[UIColor RedColor]];//设置UITextView的光标颜色