title: Subclassing and overriding UITextField in Monotouch
body: <p>I am trying to set the placeholder text for a UITextField to a different color.  I have learned that I need to subclass and override drawPlaceholderInRect method.</p>
  
  <p><a href="https://stackoverflow.com/questions/1340224/iphone-uitextfield-change-placeholder-text-color-">iPhone UITextField - Change placeholder text color</a> </p>
  
  <pre><code>    (void) drawPlaceholderInRect:(CGRect)rect {
      [[UIColor blueColor] setFill];
      [[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:16]];
  }
  </code></pre>
  
  <p>Here is what I have so far, but I just can't figure out how to get it just right.  I am confused on the last line as I don't know how to map this to MonoTouch/C# objects.</p>
  
  <pre><code>using System;
  using MonoTouch.UIKit;
  using MonoTouch.Foundation;
  using System.Drawing;
  
  namespace MyApp
  {
      [Register("CustomUITextField")]
      public class CustomUITextField:UITextField
      {
          public CustomUITextField () :base()
          {
  
          }
  
          public CustomUITextField (IntPtr handle) :base(handle)
      {
  
      }    
  
          public override void DrawPlaceholder (RectangleF rect)
          {       
  
              UIColor col = new UIColor(0,0,255.0,0.7);
              col.SetFill();
              //Not sure what to put here
              base.DrawPlaceholder (rect);}
      }
  }
  </code></pre>