2012-06-07 4 views
0

문제가 있습니다 ...UITouch가 정확한 위치를 반환하지 않음

기본보기 아래에서보기로 UITouch 위치를 가져오고 싶습니다.

내 코드는 다음과 같습니다

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 
    CGPoint previous = [[touches anyObject] previousLocationInView:toolBarView]; 
    CGPoint current = [[touches anyObject] locationInView:toolBarView]; 
} 

문제는 대신 toolbarView의보기에서 위치를 반환한다는 것입니다.

무슨 일입니까?

답변

0

U는

CGPoint current = [[touches anyObject] locationInView:toolBarView]; 

을 해결 할 수 있습니다 :

CGPoint current = [[touches anyObject] locationInView:[toolBarView view]]; 
+0

감사합니다, 나는 그것을 해결했습니다. toolBarView에 대해 사용자 상호 작용을 사용할 수 없습니다. – xXDraklordXx

관련 문제