This is a discussion on How To Make UITextField Programmatically (by coding) within the iPhone/iPad Programming Tutorials forums, part of the Programming Section category; Hello, Here I will show you how to add a UITextField programmatically. Code: UITextField * textFieldRounded = [[UITextField alloc] initWithFrame:CGRectMake(10, ...
Hello,
Here I will show you how to add a UITextField programmatically.
Code:UITextField * textFieldRounded = [[UITextField alloc] initWithFrame:CGRectMake(10, 200, 300, 50)]; textFieldRounded.borderStyle = UITextBorderStyleRoundedRect; textFieldRounded.textColor = [UIColor blackColor]; //text color textFieldRounded.font = [UIFont systemFontOfSize:17.0]; //font size textFieldRounded.placeholder = @"<enter text>"; //place holder textFieldRounded.backgroundColor = [UIColor whiteColor]; //background color textFieldRounded.autocorrectionType = UITextAutocorrectionTypeNo; // no auto correction support textFieldRounded.keyboardType = UIKeyboardTypeDefault; // type of the keyboard textFieldRounded.returnKeyType = UIReturnKeyDone; // type of the return key textFieldRounded.clearButtonMode = UITextFieldViewModeWhileEditing; // has a clear 'x' button to the right textFieldRounded.delegate = self; // let us be the delegate so we know when the keyboard's "Done" button is pressed
MozyMac Founder,Chairman and CEO
MacBook Pro Unibody late 2008 2.4Ghz 4GB ram 250GB HD
MozyMac Youtube Channel
magnificent
I was looking for this.It provide good help for my project.
Last edited by Fahad; 10-29-2011 at 05:23 PM.
MozyMac Founder,Chairman and CEO
MacBook Pro Unibody late 2008 2.4Ghz 4GB ram 250GB HD
MozyMac Youtube Channel