_txtF = [[UITextField alloc]initWithFrame:CGRectMake(0, 100, self.view.width, 30)]; _txtF.font = KFONT_14; NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"请输入内容" attributes: @{NSForegroundColorAttributeName:[UIColor redColor],
NSFontAttributeName:_txtF.font }]; _txtF.attributedPlaceholder = attrString;
[self.view addSubview:_txtF];