Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void) viewDidLoad{
- // initialize object array with initialized UITextFields
- textfieldsArr = [[NSArray alloc] initWithObjects:nameField, address1Field, address2Field, cityField, stateField, zipField, nil];
- [self initializeTextBox];
- }
- // Accessing the UITextField properties, using setLeftViewMode for example
- -(void) initializeTextBox {
- for (int i = 0; i<[textfieldsArr count]; i++) {
- UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 5)];
- [[textfieldsArr objectAtIndex:i] setLeftViewMode:UITextFieldViewModeAlways];
- [[textfieldsArr objectAtIndex:i] setLeftView:view];
- }
- }
Add Comment
Please, Sign In to add comment