title: Convert Obj-C to Swift
body: <p>Trying to override drawPlaceholderInRect in Swift2.1 so that I change the text color and I am having a hard time converting the following Obj-C to Swift:</p>
  
  <pre><code>(void)drawPlaceholderInRect:(CGRect)rect
  {
      UIColor *colour = [UIColor whiteColor];
  
      if ([self.placeholder respondsToSelector:@selector(drawInRect:withAttributes:)]) {
  
      NSDictionary *attributes = @{NSForegroundColorAttributeName: colour, NSFontAttributeName: self.font};
      CGRect boundingRect = [self.placeholder boundingRectWithSize:rect.size options:0 attributes:attributes context:nil];
      [self.placeholder drawAtPoint:CGPointMake(0, (rect.size.height/2)-boundingRect.size.height/2) withAttributes:attributes];
  }
  </code></pre>
  
  <p>I got this:</p>
  
  <pre><code>public override func drawPlaceholderInRect(rect: CGRect) {
      let textDict: NSDictionary = [NSForegroundColorAttributeName: UIColor.whiteColor()]
  
      ...
      ..
      .
  }
  </code></pre>
  
  <p>Can someone help out please?</p>