当我的UITextView获得并失去焦点时,我如何获取事件?我还没有找到这样的事件。(UITextView不可编辑)
发布于 2013-01-21 20:30:05
在代码中使用覆盖touchesBegan
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *) event
{
UITouch *touch = [[event allTouches] anyObject];
if ([touch view]==textviewtofocus)
{
// textviewtofocus get focus
}
else
// textviewtofocus lost focus
}https://stackoverflow.com/questions/14438569
复制相似问题