Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone xCode |滑动UIView_Iphone_Xcode_Ios - Fatal编程技术网

iPhone xCode |滑动UIView

iPhone xCode |滑动UIView,iphone,xcode,ios,Iphone,Xcode,Ios,如何从UIView转换到其他视图,如从左或右幻灯片?除了、参考和。阅读开发人员文档,你就不必问这个问题了。这样写 [UIView beginAnimations:@"" context:NULL]; //The new position for view1 [myview1 setFrame: CGRectMake(0,0,320,100)]; //The new position for view2 [myview2 setFrame: CGRectMake(320, 0, 320, 10

如何从UIView转换到其他视图,如从左或右幻灯片?

除了、参考和。阅读开发人员文档,你就不必问这个问题了。

这样写

[UIView beginAnimations:@"" context:NULL];

//The new position for view1
[myview1 setFrame: CGRectMake(0,0,320,100)];

//The new position for view2
[myview2 setFrame: CGRectMake(320, 0, 320, 100)];

//The animation duration
[UIView setAnimationDuration:2.0];

[UIView setAnimationDelay: UIViewAnimationCurveEaseIn];

[UIView commitAnimations];

该示例名为ViewTransitions,谢谢texmex5您的答案应该是可接受的。在谷歌搜索“uiview Committenimations”时,我找到了一个示例项目