获取当前正在响应的编辑组件:UITextField或UIText

2018-06-08  本文已影响7人  番薯大佬
[[NSNotificationCenter defaultCenter] addObserver:strongSelf selector:@selector(editviewBeginEdit:) name:UITextFieldTextDidBeginEditingNotification object:nil];
- (void)editviewBeginEdit:(NSNotification *)notification
{
    NSLog(@"%s, notification = %@", __func__, notification);
    
    UIView *editingView = notification.object;
    NSLog(@"editingView = %@", editingView);
}
上一篇 下一篇

猜你喜欢

热点阅读