Hope this is not a very basic question but I have a problem with a UITextField that I use to allow a user to enter his/her user name. It works totally fine with one exception: eventhough the game is in landscape, the UITextField orientation is in Portrait. Not ideal
I create the textfield like this:
UITextField *playerTextField = [ [ UITextField alloc ] initWithFrame: CGRectMake(50, 50, 145, 38) ];
playerTextField.adjustsFontSizeToFitWidth = YES;
playerTextField.textColor = [UIColor blackColor];
playerTextField.font = [UIFont systemFontOfSize:17.0];
playerTextField.placeholder = @"";
playerTextField.backgroundColor = [UIColor whiteColor];
playerTextField.autocorrectionType = UITextAutocorrectionTypeNo; // no auto correction support
playerTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; // no auto capitalization support
playerTextField.textAlignment = UITextAlignmentLeft;
playerTextField.keyboardType = UIKeyboardTypeDefault; // use the default type input method (entire keyboard)
playerTextField.returnKeyType = UIReturnKeyDone;
playerTextField.tag = 0;
playerTextField.delegate = self;
playerTextField.clearButtonMode = UITextFieldViewModeNever; // no clear 'x' button to the right
playerTextField.text = [[GameHUD sharedHUD] LocUserName];
[ playerTextField setEnabled: YES ];
[[[Director sharedDirector] openGLView] addSubview:playerTextField];
[playerTextField release];
Can anyone point me in the right direction how to show it in landscape?
Thanks a lot!