0
난 그냥 모든 세포/왼쪽으로 이동 내 cellForRowAtIndex 위임 방법의 끝에 다음과 같은 애니메이션이 바로 내가 pseudoEditing 플래그가 설정 여부가 있는지 여부에 따라 한
:다음 UIView 애니메이션이 한 방향으로 만 작동하는 이유는 무엇입니까?
여기[UIView beginAnimations:@"cell shift" context:nil];
[UIView setAnimationDuration:kEventActionViewAnimationDuration];
cell.eventName.frame = (self.pseudoEditing) ? kPseudoEditingFirstIndentedRect : kFirstLabelRect;
cell.eventLocationName.frame = (self.pseudoEditing) ? kPseudoEditingSecondIndentedRect : kSecondaryLabelRect;
cell.eventStartDate.frame = (self.pseudoEditing) ? kPseudoEditingThirdIndentedRect : kThirdLabelRect;
cell.eventStartEndTime.frame = (self.pseudoEditing) ? kPseudoEditingFourthIndentedRect : kFourthLabelRect;
cell.imageView.frame = (self.pseudoEditing) ? kImageViewIndentedRect : kImageViewRect;
cell.rsvpImageView.hidden = !self.pseudoEditing;
[UIView commitAnimations];
return cell;
는 정수의 선언되는 경우 :
#define kImageViewRect CGRectMake(10, 9.0, 60.0, 60.0)
#define kFirstLabelRect CGRectMake(80, 10.0, 220.0, 20.0)
#define kSecondaryLabelRect CGRectMake(80, 30.0, 220.0, 20.0)
#define kThirdLabelRect CGRectMake(80, 50.0, 220.0, 20.0)
#define kFourthLabelRect CGRectMake(180.0, 50.0, 110.0, 20.0)
#define kPseudoEditingFirstIndentedRect CGRectMake(115.0, 10.0, 195.0, 20.0)
#define kPseudoEditingSecondIndentedRect CGRectMake(115.0, 30.0, 195.0, 20.0)
#define kPseudoEditingThirdIndentedRect CGRectMake(115.0, 50.0, 195.0, 20.0)
#define kPseudoEditingFourthIndentedRect CGRectMake(200.0, 50.0, 110.0, 20.0)
문제는 왼쪽에서 오른쪽으로 정상 상태에서 왼쪽 오른쪽 에서 다시하지 이동 때 한 방향으로 만 작동한다는 것입니다.
아이디어가 있으십니까?
애니메이션을 설정하는 데 사용할 코드를 표시 할 수 있습니까? –
더 쉽게 애니메이션을 차단하고 Apple에서 승인 한 방법으로 애니메이션을 시도해야합니다. – msgambel
@MSgambel : Apple은 두 가지 방법 모두를 "승인"합니다. 아마도 블록 사용이 선호되는 방법일까요? – titaniumdecoy