I’m having some trouble dynamically removing UITextFields from my scrollview when the user taps a button. The UITextields were created programatically. This is what I have thus far, any help would be appreciated.
-(IBAction)resetAll{
int textFieldTag;
for (int i=0; i<[array count]; i++) {
textFieldTag = i + 100;
UITextField *myTextField = (UITextField *)[self.view viewWithTag:textFieldTag];
[myTextField removeFromSuperview];
[myTextField release];
}
}
1 Answer