Jan 172011
In order to add an editable text box. E.g.: To ask the username, use the next code:
UITextField* textField = [[UITextField alloc] initWithFrame:CGRectMake(100, 200, 300, 50)]; textField.delegate = self; textField.placeholder = @"<Enter Your Username>"; textField.textAlignment = UITextAlignmentCenter; [self.view addSubview: textField]; [textField release]; And add the delegate <UITextFieldDelegate> to your viewController:- (BOOL)textFieldShouldReturn:(UITextField *)textField{ //Do something with textField.text; [textField resignFirstResponder]; return YES; }