Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad {
- [super viewDidLoad];
- UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 100, 40)];
- textField.borderStyle = UITextBorderStyleLine;
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
- label.text = @"mg";
- label.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.0];
- textField.rightViewMode = UITextFieldViewModeAlways;
- textField.rightView = label;
- [self.view addSubview:textField];
- [label release];
- [textField release];
- }
Add Comment
Please, Sign In to add comment