(줌) :내가 지금처럼 내 시야를 확장하기 위해 노력하고있어
CGRect endFrame = self.detailView.bounds;
[UIView animateWithDuration:0.25 animations:^{
self.descriptionButton.bounds = endFrame;
}completion:^(BOOL finished) {
self.containerView.alpha = 0.0;
self.detailView.alpha = 1.0;
}];
내 detailView는 컨테이너이다. 내 descriptionButton은 왼쪽 위 모서리에 있습니다. 버튼을 전체 화면으로 가져 가면 확대/축소 효과를주고 싶습니다. 그러나 기본적으로 Core Animation은 앵커 포인트의 중심을 기준으로 확장됩니다.
는이 같은 뷰의 레이어의 오른쪽 아래 모서리에 기준점을 설정하려고 :self.descriptionButton.layer.anchorPoint = CGPointMake(self.descriptionButton.bounds.size.width, self.descriptionButton.bounds.size.height);
CGRect endFrame = self.detailView.bounds;
[UIView animateWithDuration:0.25 animations:^{
self.descriptionButton.bounds = endFrame;
}completion:^(BOOL finished) {
self.containerView.alpha = 0.0;
self.detailView.alpha = 1.0;
}];
을하지만 그렇게 할 때, 나는 전혀 애니메이션이 표시되지 않습니다. 이견있는 사람? 감사.