Thursday, 17 January 2013

To create dynamically textfield


  
UITextField *nameField = [[UITextField alloc] initWithFrame:CGRectMake(155, 100, 100, 20)];
    nameField.returnKeyType = UIReturnKeyDone;
    nameField.delegate=self;
    [nameField setKeyboardType:UIKeyboardTypeNamePhonePad];
    nameField.backgroundColor=[UIColor whiteColor];
    nameField.text = @"";
    nameField.autocapitalizationType = UITextAutocapitalizationTypeWords;
    nameField.adjustsFontSizeToFitWidth = TRUE;
    [self.view addSubview:nameField];