Here is my solution in MonoTouch to fix the alignment of placeholder vs text. As I noticed in the comments, there are three different parts: editing, static text and static landowner. Equivalent to the C-of Objective drawTextInRect: and drawPlaceholderInRect: .
. , , , - , , iOS .
, -.
Allison
public class MyTextField : UITextField
{
public MyTextField(RectangleF rect) : base(rect)
{
}
public override void DrawPlaceholder(RectangleF rect)
{
base.DrawPlaceholder(new RectangleF(rect.X, rect.Y + 2, rect.Width, rect.Height));
}
public override void DrawText(RectangleF rect)
{
base.DrawText(new RectangleF(rect.X, rect.Y + 2, rect.Width, rect.Height));
}
}