Closed johndpope closed 9 years ago
That's right, EZFormField
isn't meant to be used directly. It is an abstract base class.
You can simply use a EZFormTextField
(or any other concrete field type) with no control wired up. The form fields don't require UI to be attached.
Cheers, Chris
Hi Chris,
Nice job on this library.
I wonder if you could clarify how to use / set fields that don't necessarily have an associated uilabel / uitextfield.
static NSString const EZFDRegistrationFormIssueLatitudeKey = @"Latitude"; static NSString const EZFDRegistrationFormIssueLongitudeKey = @"Longitude";
I am basically hooking up the formfields like this
then later in the class - trying to set this values. [formDelegate.form setModelValue:[NSString stringWithFormat:@"%f", c.latitude] forKey:EZFDRegistrationFormIssueLatitudeKey]; [formDelegate.form setModelValue:[NSString stringWithFormat:@"%f", c.longitude] forKey:EZFDRegistrationFormIssueLongitudeKey];
[EZFormField setActualFieldValue:]: unrecognized selector sent to instance 0x170450f50
(void)setFieldValue:(id)value canUpdateView:(BOOL)canUpdateView { [(id)self setActualFieldValue:value];
if (canUpdateView && [(id)self respondsToSelector:@selector(updateView)]) {
[(id)self updateView];
}
__strong EZForm *form = self.form; [form formFieldDidChangeValue:self]; }
Is the EZFormField not intended to be used directly?
JP