I just created a custom UITextField subclass that does this. To use it simply create your UITextField on the Storyboard or Xib... put a placeholder text in there, set the text fields class as OBSTextFieldWithLabel and then you can use the following code:
@interface OBSTextFieldWithLabel : UITextField
@end
@implementation OBSTextFieldWithLabel
- (void)awakeFromNib
{
[super awakeFromNib];
NSString *labelText = [self placeholder];
self.placeholder = nil;
CGRect labelFrame = CGRectMake(20, 10, 150, 15);
UILabel *placeholderLabel = [[UILabel alloc] initWithFrame:labelFrame];
[placeholderLabel setFont:[UIFont systemFontOfSize:12]];
[placeholderLabel setTextColor:[UIColor lightGrayColor]];
[placeholderLabel setText:labelText];
[self addSubview:placeholderLabel];
[self setTextAlignment:NSTextAlignmentRight];
}
@end
This is probably not 100% perfect as the label size is not dynamically set and all...but it should get you up and running and it works :-)