Vertically align the contents of a UITextField

textfield.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;