I'm creating an IOS form that submits feed back.
I want to have placeholder text to be in the center vertically and left alignment horizontal in the text field
I have tried this
- (void)drawPlaceholderInRect:(CGRect)rect {
[RGB(36, 84, 157) setFill];
UIFont *font = [UIFont SingPostLightItalicFontOfSize:_placeholderFontSize fontKey:kSingPostFontOpenSans];
NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
paragraphStyle.alignment = NSTextAlignmentLeft;
NSDictionary *attributes = @{ NSFontAttributeName: font,
NSParagraphStyleAttributeName: paragraphStyle,
NSForegroundColorAttributeName: [UIColor blackColor]};
[[self placeholder] drawInRect:rect withAttributes:attributes];
}
But the place holder text is on top vertical. How can we achieve the gold. Thanks a lot