ios 页面滑入滑出
从左边滑进
CGRect r1,r2;
r1 = app.testview.view.frame;
r2 = self.view.frame;
[app.testview.view setFrame:CGRectMake(320, r1.origin.y,r1.size.width,r1.size.height)];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4];
[app.window addSubview:[app.testview view]];
[app addConvertview];//添加遮挡层
[self.view setFrame:CGRectMake(-320, r2.origin.y,r2.size.width,r2.size.height)];
[app.testview.view setFrame:CGRectMake(0, r1.origin.y,r1.size.width,r1.size.height)];
[UIView commitAnimations];
[self performSelector:@selector(removeSelf) withObject:nil afterDelay:0.6];
右边滑出
CGRect r1,r2;
r1 = app.TestView.view.frame;
r2 = self.view.frame;
[app.TestView.view setFrame:CGRectMake(-320, r1.origin.y,r1.size.width,r1.size.height)];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.4];
[app.window addSubview:[app.TestView view]];
[app addConvertview];//添加遮挡层
[self.view setFrame:CGRectMake(320, r2.origin.y,r2.size.width,r2.size.height)];
[app.TestView.view setFrame:CGRectMake(0, r1.origin.y,r1.size.width,r1.size.height)];
[UIView commitAnimations];
[self performSelector:@selector(removeSelf) withObject:nil afterDelay:0.6];
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。