iOS 輸入框-提示文字
在 iOS 6+ 以上,針對輸入框提供了attributedPlaceholder來設置提示文字的顏色.
使用方式
UITextField *nameText
UIColor *color = [UIColor grayColor];
nameText.attributedPlaceholder =
[[NSAttributedString alloc]
initWithString:@”Full Name”
attributes:@{NSForegroundColorAttributeName:color}];