textField.placeholder = @"username is in here"; [textField setValue:[UIColor redColr] forKeyPath:@"_placeholderLabel.textColor"]; [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
setValue: forKeyPath: 利用kvc的机制,设置placeholder的属性