Open blitzxion opened 10 years ago
Same thing here. Tried calling -unwireUserViews in -viewWillDisappear:, but that can't work in my case because we have several instances of EZFormMultiRadioFormField in the form.
It looks like EZFormRadioField
combined with it's superclass EZFormTextField
are missing a few edge cases around unwiring the input view if it's a UILabel.
- (void)unwireInputView
{
if ([self.userView.inputView isKindOfClass:[UIPickerView class]]) {
UIPickerView *pickerView = (UIPickerView *)self.userView.inputView;
if (pickerView.dataSource == self) pickerView.dataSource = nil;
if (pickerView.delegate == self) pickerView.delegate = nil;
}
self.userView.inputView = nil;
}
It's clear here that if it's a label, it will fall over.
IMHO the userView/inputView behaviour needs some reworking here.
Setup:
Error:
Using XCode 5, iOS7 (iOS6 SDK), iPhone 4S (just incase someone needed this information)
With only a few exceptions like viewDidUnload (deprecated), I followed exactly how the example project built up and tore down the fields. This only seems to occur with the combination of EZFormRadioFields and UILabels.
The reason why I bring this up is because every time I fire up this view, memory consumption increases a bit, but when leaving the view, it doesn't get released (using ARC, etc, etc). Figured I would have to use the unwireUserViews to fix this. For the most part, up until it hits that exception, the memory usage drops a little bit.
Could I be missing something?