아이폰의 테이블뷰의 속성 중 userInteractionEnabled을 NO로 지정하게 되면 UITableViewDelegate 가 동작하지 않는다

이 경우 아래의 메소드를 구현하여 임의의 지역에 이벤트를 발생하도록 할 수 있다

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event



- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
 UITouch *touch  = [touches anyObject];
 CGPoint touchPoint   = [touch locationInView:i_tableView];

if ( touchPoint.y > y && touchPoint.y < y+cell_height )
 { 
             특정동작 
 }

-------------  생략 -----------------------------

}



+ Recent posts