Q:

How could I change the color of a fixed character of placeholder text, as I am bit confused to perform this

I tried all the ways but its not as per my aspectations please help.
I have to change the color of all * to red.
I know I have to work in didload event.
I tried to get the last character of all the strings and do one by one but it makes the code quite lengthy hope there would be any should code/ approach.
Thanks
Image Here Please have a look

A:

Try this one
NSMutableAttributedString *placeHoldertString = [[NSMutableAttributedString alloc] init];
    NSAttributedString *str1 = [[NSAttributedString alloc] initWithString:@"First Name" attributes:@{ NSForegroundColorAttributeName : [UIColor lightGrayColor] }];

    NSAttributedString *str2 = [[NSAttributedString alloc] initWithString:@"*" attributes:@{ NSForegroundColorAttributeName : [UIColor redColor] }];

    [placeHoldertString appendAttributedString:str1];
    [placeHoldertString appendAttributedString:str2];

    yourTextFeild.attributedPlaceholder = placeHoldertString;

