美文网首页
获取当前正在响应的编辑组件:UITextField或UIText

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

作者: 番薯大佬 | 来源:发表于2018-06-08 18:03 被阅读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);
}

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/rjnasftx.html