0
나는 드래그 할 수있는 뷰가 있습니다. 이제는 더 자연스러운 느낌을 갖기 위해 끌기를 멈 추면보기가 어려워졌습니다.UIView 드래그 앤 아웃
누구나 아이디어가 있습니까?
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self];
CGPoint previous = [touch previousLocationInView:self];
if (!CGAffineTransformIsIdentity(self.transform)) {
location = CGPointApplyAffineTransform(location, self.transform);
previous = CGPointApplyAffineTransform(previous, self.transform);
}
self.frame = CGRectOffset(self.frame,
(location.x - previous.x),
(location.y - previous.y));
}
건배
정지 상태로 드래그하면 애니메이션이 숨겨진 상태로 보시겠습니까? –
보기가 여전히 표시되어야합니다. – gabac
은 끌기를 끝낸 후에도보기에 애니메이션을 추가하려고합니다. –