0

UITextView がフォーカスを取得して失ったときにイベントを取得するにはどうすればよいですか? イベントなどは見つかりませんでした。(UITextView は編集不可)

4

1 に答える 1

0

コードでオーバーライド touchesBegan を使用する

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *) event
{
    UITouch *touch = [[event allTouches] anyObject];
    if ([touch view]==textviewtofocus)
    {
        // textviewtofocus get focus
    }
else 
// textviewtofocus lost focus

}
于 2013-01-21T12:30:05.450 に答える