コードでオーバーライド touchesBegan を使用する
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *) event
{
UITouch *touch = [[event allTouches] anyObject];
if ([touch view]==textviewtofocus)
{
// textviewtofocus get focus
}
else
// textviewtofocus lost focus
}