Ios 在UIDeviceOrientationAndscapeLeft和UIDeviceOrientationAndscapeRight中实现相同的页面转换
我有一个在iOS 6.0 sdk中开发的项目,它应该可以在iOS 4.3+设备上运行,在我的项目中,我使用页面卷曲在两个页面之间导航,但是在LandscapeLeft中发生的页面卷曲与在Landscape Right中发生的页面卷曲不同Ios 在UIDeviceOrientationAndscapeLeft和UIDeviceOrientationAndscapeRight中实现相同的页面转换,ios,uiinterfaceorientation,uiviewanimationtransition,page-curl,uideviceorientation,Ios,Uiinterfaceorientation,Uiviewanimationtransition,Page Curl,Uideviceorientation,我有一个在iOS 6.0 sdk中开发的项目,它应该可以在iOS 4.3+设备上运行,在我的项目中,我使用页面卷曲在两个页面之间导航,但是在LandscapeLeft中发生的页面卷曲与在Landscape Right中发生的页面卷曲不同我希望在横向左侧发生的相同页面卷曲在横向右侧发生 请看一下链接以便更好地理解。 我使用的代码如下所示 -(IBAction)nextBtnTapped { UIDeviceOrientation deviceOrientation=[UIDev
我希望在横向左侧发生的相同页面卷曲在横向右侧发生
请看一下链接以便更好地理解。 我使用的代码如下所示
-(IBAction)nextBtnTapped {
UIDeviceOrientation deviceOrientation=[UIDevice currentDevice].orientation;
page2 *Obj=[[page2 alloc]init];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
if (deviceOrientation==UIDeviceOrientationLandscapeLeft)
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
else if(deviceOrientation==UIDeviceOrientationLandscapeRight)
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
[self.navigationController pushViewController:Obj animated:NO];
[UIView commitAnimations];
}
-(IBAction)prevBtnTapped {
UIDeviceOrientation deviceOrientation=[UIDevice currentDevice].orientation;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.8];
if (deviceOrientation==UIDeviceOrientationLandscapeLeft)
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
else if(deviceOrientation==UIDeviceOrientationLandscapeRight)
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
[self.navigationController popViewControllerAnimated:YES];
[UIView commitAnimations];
}
谁能告诉我我在这段代码中犯了什么错误。
任何帮助都将不胜感激。
uideviceorientation和scapeleft
带有页面卷曲的软件被窃听。您将无法使其正常工作。听到这个消息太可怕了……您能告诉我替代方案吗?没有找到(我直接使用核心动画转换)。唯一的可能性是使用非标准动画,例如。