Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created March 10, 2013 02:02
Show Gist options
  • Select an option

  • Save romyilano/5126762 to your computer and use it in GitHub Desktop.

Select an option

Save romyilano/5126762 to your computer and use it in GitHub Desktop.
CGRect passwordTextFieldFrame = CGRectMake(20.0f, 100.0f, 280.0f, 31.0f);
UITextField *passwordTextField = [[UITextField alloc] initWithFrame:passwordTextFieldFrame];
passwordTextField.placeholder = @"Password";
passwordTextField.backgroundColor = [UIColor whiteColor];
passwordTextField.textColor = [UIColor blackColor];
passwordTextField.font = [UIFont systemFontOfSize:14.0f];
passwordTextField.borderStyle = UITextBorderStyleRoundedRect;
passwordTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
passwordTextField.returnKeyType = UIReturnKeyDone;
passwordTextField.textAlignment = UITextAlignmentLeft;
passwordTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
passwordTextField.tag = 2;
passwordTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
[self.view addSubview:passwordTextField];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment