0
我正在使用目標C方面庫,在下面的情況下,我想在調用textFieldDidEndEditing方法時偵聽所有UITextfields。catch textFieldDidEndEditing UITextField運行時
它不工作,我試過UIButton它的作品,但不是UITextfield和UITextview。
[UITextField aspect_hookSelector:@selector(textFieldDidEndEditing:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> aspectInfo) {
if ([[aspectInfo instance] isKindOfClass:[UITextField class]]) {
UITextField *textView = [aspectInfo instance];
NSLog(@"***** UITEXTTTTTTTTTTTTTTTTTTT click event called ");
}
}
我在這種情況下錯過了什麼?爲什麼它不起作用?