iphone - Dynamically insert more UITextFields -
I have been told in the attached screen shot. When the blue plus button is clicked, then there is a need to insert another Scroll view is not enabled : You can do this: In i Outlet Find run I talk, The location of the Kbd> + button is changing. I think you can do this :) Edit: Adding the following to the above method UItextfield between the previous text fields and the textview and the blue-ed button, which appears near the dynamically-entered new eTextfield. Have to be. Can anyone suggest how to achieve this? I've put all the fields in the
UIScrollview .
previousTextField which has been added for the first time. As the name suggests, it will store the latest word text field.
- (IBAction) addTextField: (ID) sender {float x = previous text file.frame.orine.x; Float y = previoustextfiled.frame.origin.i + 50; // Meet the last textfield and add 10 or more to it. Float w = previousTextField.frame.size.width; Float H = Previoustextfiled.frame.height.height; CGRect frame = CGRectMake (X, Y, W, H); UITextField * textField = [[UITextField alloc] initWithFrame: frame]; TextField.placeholder = @ "Enter username or email"; TextField.borderStyle = UITextBorderStyleRoundedRect; TextField.font = [UIFont systemFontOfSize: 15]; TextField.autocorrectionType = UITextAutocorrectionTypeNo; TextField.keyboardType = UIKeyboardTypeDefault; TextField.returnKeyType = UIReturnKeyDone; TextField.clearButtonMode = UITextFieldViewModeWhile edit; [Self.view addSubview: textField]; PreviousTextField = text field; }
How to go with an idea / algorithm, the compiler is not checked
There is an outlet for CGRTE framebuttons = CGRactMake (adbuten.fr.org.x, adbutton.frame.organ 50+, adbooten.frame size.width, adbooten.frame size.heit); [AddButton removeFromSuperview]; [AddButton setFrame: framebuttons]; [Self.view addSubview: addButton];
Comments
Post a Comment