1
는 내가보기에있는 UIButton를 만들고, 내가 아닌 전경에게있는 touchesMoved 만있는 UIButton을 제어 할 수 할touchesMoved에 한 가지보기 만 제어하게하는 방법은 무엇입니까?
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint touchMoved = [touch locationInView:self.view];
}
나는 내가있는 UIButton하고있는 UIButton에 닿으면이 처럼하고 싶은 내 손가락으로 움직일 수 있습니다. 다른보기를 터치하고 손가락이 화면에서 움직이는 경우 UIButton은 아무 것도하지 않습니다. 즉, touchesMoved 함수는 UIButton의 역할 만 가지고 있다는 것을 의미하므로 어떻게 할 수 있습니까? 덕분에
@megamind : 얻었습니까? –
감사합니다.하지만 여전히 작동하지 않습니다. 버튼을 지금 이동할 수 없습니다. 감사합니다. – matt
if (CGRectContainsPoint (theButton.frame, touchBegan)) { buttonTouched = YES; } 여기 코드가 작동하지 않습니다 – matt