We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
页面中添加textfield 或者textview 会导致控制器无法释放,可以看键盘处理页面 目前发现注释父类中 field.delegate = self; 可以可以释放
The text was updated successfully, but these errors were encountered:
首先非常感谢您提出问题和给出解决方案
您给出的解决方案的确可行, 控制器会释放
我的的测试步骤
-结果: 是第三方 IQKeyboardReturnKeyHandler 这个类创建的对象存在的 bug,
@implementation IQKeyboardReturnKeyHandler { NSMutableSet *textFieldInfoCache; } -(void)addTextFieldView:(UIView*)view { NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; dict[kIQTextField] = view; if ([view isKindOfClass:[UITextField class]] || [view isKindOfClass:[UITextView class]]) { UITextField *textField = (UITextField*)view; dict[kIQTextFieldReturnKeyType] = @(textField.returnKeyType); // 怀疑是这里 if (textField.delegate) dict[kIQTextFieldDelegate] = textField.delegate; [textField setDelegate:self]; } [textFieldInfoCache addObject:dict]; }
Sorry, something went wrong.
感谢回复,确实是IQKeyboard的问题 hackiftekhar/IQKeyboardManager#1228
No branches or pull requests
页面中添加textfield 或者textview 会导致控制器无法释放,可以看键盘处理页面
目前发现注释父类中 field.delegate = self; 可以可以释放
The text was updated successfully, but these errors were encountered: