I have a UITextField
where i need to change the Placeholder
Font and Color, i'm calling the below method in drawRect method,
-(void) setFontColorForPlaceHolder
{
for(id obj in [[self baseScrollView] subviews])
{
if([obj isKindOfClass:[UITextField class]])
{
[obj setAttributedPlaceholder:[[NSAttributedString alloc]initWithString:[obj placeholder] attributes:@{
NSFontAttributeName:kFutura_Medium_14 ,NSForegroundColorAttributeName:[UIColor redColor]
}]];
}
}
}
Here the COLOR is changing but the FONT is not setting. What is the issue here with setAttributedPlaceholder
.