2
안녕하세요, y 축의 뷰를 회전하려고합니다. 다음 코드는 성공했지만 지금은 회전 중입니다. 중심에서, 나는 검색하고 나는 그것이 회전 할 층의 anchorPoint
속성을 가지고 있지만, 그것은 또한 내가 Taasky가 도움이되는 앱과 같은 메뉴 효과를 확인하려면 추가 정보를 원하시면 y 축에서 동시에 z 축을 회전시킵니다. 끝
leftDoorView.layer.anchorPoint = CGPointMake(0.5,0);
// Code to rotate view on Y axis and slight translate on Z-axis
angle -= 1.57f;
[UIView animateWithDuration:0.5 animations:^{
CATransform3D transloate = CATransform3DMakeTranslation(0, 0, -(leftDoorView.frame.size.width/2.0));
CATransform3D rotate = CATransform3DMakeRotation(angle, 0, 1, 0);
CATransform3D mat = CATransform3DConcat(rotate, transloate);
leftDoorView.layer.transform = CATransform3DPerspect(mat, CGPointMake(0, 0), 500);
}];
작동하지 않습니다 내보기의 원치 않는 번역한다 정말 감사하겠습니다