작동하는 기능 페이지 컬이 있습니다. 문제는 iPad의 교체입니다. 앱은 가로 방향으로 만 실행되며 왼쪽과 오른쪽을 지원합니다. iPad가 '풍경 오른쪽'인 경우 컬이 오른쪽 하단에서 발생합니다. iPad를 회전하면 뷰가 예상대로 회전하지만 지금은 왼쪽 상단에서 컬이 발생합니다. 회전 할 때 알림을 추가하고 애니메이션 하위 유형을 변경하려고 시도했지만 주사위를 변경하지 않았습니다.iPad에서 방향 전환을 준수하지 않는 CAT 전환
-(IBAction)curlViewUp
{
uiv_help.alpha = 1.0;
[UIView animateWithDuration:1.0
animations:^{
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:0.7];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
animation.type = @"pageCurl";
animation.subtype = curlDirection;
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 0.20;
[animation setRemovedOnCompletion:NO];
[self.view.layer addAnimation:animation forKey:@"pageCurlAnimation"];
[self.view addSubview:uiv_help];
;}
];
}
-(IBAction)curlViewDown
{
uiv_help.alpha = 0.0;
[UIView animateWithDuration:1.0
animations:^{
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:0.7];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
animation.type = @"pageUnCurl";
animation.subtype = curlDirection;
animation.fillMode = kCAFillModeForwards;
animation.startProgress = 0.80;
[animation setRemovedOnCompletion:YES];
[self.view.layer addAnimation:animation forKey:@"pageUnCurlAnimation"];
//[self.view removeFromSuperview];
[uiv_help removeFromSuperview];
;}
];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft | interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
-(void)checkRotation:(NSNotification*)notification
{
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if(orientation == UIInterfaceOrientationLandscapeLeft)
{
NSLog(@"UIInterfaceOrientationLandscapeLeft");
curlDirection = @"fromRight";
} else if (orientation == UIInterfaceOrientationLandscapeRight) {
NSLog(@"UIInterfaceOrientationLandscapeRight");
curlDirection = @"fromRight";
}
}
나는 그것이 Uikit 버그 또는 뭔가 일 것임에 틀림 없다고 생각한다. – jonydep
StackOverflow에 복사했을 때의 오타 였을지 모르지만 여기에 curlDirection = @ "fromRight"라고 표시된다. 방향이 왼쪽 또는 오른쪽인지. –
사람들은 왜 그들을 따라갈 의도가 없을 때 현상금을 제공합니까? – foundry