I'm adding padding to UILabel
public partial class MessageLabel : UILabel
{
public MessageLabel(IntPtr handle) : base(handle)
{
}
public override void DrawText(CoreGraphics.CGRect rect)
{
UIEdgeInsets insets = new UIEdgeInsets() { Bottom = 5, Top = 5, Left = 5, Right = 5 };
base.DrawText(insets.InsetRect(rect));
}
}
Padding are added well, but last line is cropped, due to extra empty space I added... If I increate height with 10 in this methods, padding are added only at the top of label.
with paddings screen 1 - looks nice, but missing words:
without passings screen 2 - show whole message:
Any solution?