ฉันต้องการเปลี่ยนกรอบมุมมองเป็นขอบเขตเต็มหน้าจอและแปลงเป็นแนวนอน
ฉันใช้เฟรมการเปลี่ยนแปลงภาพเคลื่อนไหว UIView และการแปลงมุมมอง
- (void)enterFullScreen {
CGRect frame = CGRectMake(0, 0, CGRectGetHeight(UIScreen.mainScreen.bounds), CGRectGetWidth(UIScreen.mainScreen.bounds));
self.originFrame = self.presentView.frame;
[UIView animateWithDuration:ZXYAnimationDuration animations:^{
self.presentView.transform = CGAffineTransformMakeRotation(M_PI_2);
self.presentView.frame = frame;
} completion:^(BOOL finished) {
}];
}
- (void)exitFullScreen {
[UIView animateWithDuration:ZXYAnimationDuration animations:^{
self.presentView.transform = CGAffineTransformIdentity;
self.presentView.frame = self.originFrame;
} completion:^(BOOL finished) {
}];
}
ฉันคาดว่ามุมมองจะหมุนเป็นแนวนอนและเต็มหน้าจอ แต่ดูเหมือนว่าจะมีข้อผิดพลาดในการหมุน