ios - UIview 动画将一个 View 覆盖到另一个 View
<p><p>我是新的 iphone 开发人员,我有 ipad 横向模式的 uiview 动画问题。我有两个 Viewview1(如 Split View)和 view2(覆盖的剩余窗口)。当我触摸从右移到左 view2 时,它将被覆盖带有移动动画的 view1。同时当我触摸从左到右移动 view2 来适应旧位置。请分享你的想法</p>
<p>问候,
拉杰什。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>大家好,我终于找到答案了,</p>
<pre><code>- (void)viewDidLoad
{
UISwipeGestureRecognizer *recognizer = [ initWithTarget:self action:@selector(rightSwipeHandle:)];
;
;
;
;
UISwipeGestureRecognizer *recognizerleft = [ initWithTarget:self action:@selector(leftSwipeHandle:)];
;
;
;
;
;
;
}
//To set the frame position of the view
- (void)rightSwipeHandle:(UISwipeGestureRecognizer*)gestureRecognizer
{
NSLog(@"rightSwipeHandle");
;
;
;
secondView.frame=CGRectMake(360, 0, 660, 768);
;
}
//To set the frame position of the view
- (void)leftSwipeHandle:(UISwipeGestureRecognizer*)gestureRecognizer
{
NSLog(@"leftSwipeHandle");
;
;
;
secondView.frame=CGRectMake(200, 0, 858, 768);
;
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - UIview 动画将一个 View 覆盖到另一个 View ,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/11561687/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/11561687/
</a>
</p>
页:
[1]