0

업로드 프로세스를 통합하기 위해 TTThumbsViewController를 하위 클래스 화했습니다. 그 대가로 나는 또한 삭제 프로세스를 통합하려고합니다. 제스처를 통해 ThreeT20이 TTThumbsViewController에서 만진 사진을 식별하는 방법은 무엇입니까?

내 상황

: 나는 사진을 클릭상의 GestureRecognizer를 추가 :

UILongPressGestureRecognizer* recognizer = [[UILongPressGestureRecognizer alloc] 
              initWithTarget:self action:@selector(deleteImage:)]; 
[self.view addGestureRecognizer:recognizer]; 

을 ...

- (void)deleteImage:(UILongPressGestureRecognizer*)recognizer { 
    __block IMHRemotePhoto *photo = [self.dataSource 
            tableView:self.tableView 
            objectForRowAtIndexPath:[self.tableView 
            indexPathForRowAtPoint:gestureStartPoint]]; 

} 

그러나 조각으로 난 단지 행이 아니라 내가 TTThumbsViewController을 선택한 개체를 식별

디폴트 당 연속으로 최대 4 개의 요소를 가질 수 있습니다.

아이디어가 있습니까?

답변

0

hijolan

감사합니다, 당신은 항상 UIView의

TTThumbView * selectedThumb = [self.tableView hitTest:point withEvent:nil]; 
if (selectedThumb && [selectedThumb isKindOfClass:[TTThumbView class]]) { 
    // Do something with this thumb 
} 
+0

을 기능을 그러나 hitTest 사용할 수 있습니다 나는 그것을 다음 몇 주를 시도하고 바로 이후로 그 답을 표시 할 줄 것이다. 나는 또한 다른 해결 방법을 발견하고 그것을 출판 할 것이다 ... 당신의 대답에 감사합니다, hijolan –

관련 문제