Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Change the Font and Color of UITextField's Placeholder

    • 0
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 445
    Comment on it

    Hi Readers,


    Below are two simple lines you need to add to your code for changing the font and color of the UITextField's Placeholder.


    _txttest.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:30.0f];
    
    _txttest.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"Placeholder" attributes:@{NSForegroundColorAttributeName:[UIColor redColor]}];
    

    Here, "_txttest" is the outlet of a textField.


    Thanx for reading..:)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: