UITextField set placeholder color as dark in iOS

前端 未结 8 763
误落风尘
误落风尘 2021-02-01 10:59

I have tried to set UITextField \"Placeholder\" color as dark.

NSAttributedString * search = [[NSAttributedString alloc] initWithSt         


        
8条回答
  •  醉酒成梦
    2021-02-01 11:41

    Here is Latest way to Change FONT and COLOR of placeholder text

        self.emailField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Email" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName :[UIFont fontWithName:@"OpenSans" size:14.0]}];
    

提交回复
热议问题