让UIView“消失”在另一个标签栏后面

时间:2010-01-31 19:32:33

标签: iphone animation user-interface sdk core-animation

我正在使用以下代码使屏幕底部的小视图消失:

int y_dest = self.application.windows.frame.size.height; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.33f]; [UIView setAnimationDelegate:self]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(closeAnimationDidStop:finished:context:)]; self.view.frame = CGRectMake(0, y_dest, self.view.frame.size.width, self.view.frame.size.height); [UIView commitAnimations];

当视图位于屏幕底部时,这非常有效,但现在我必须将它添加到TabBar上方的窗口,这意味着视图现在在tabbar顶部而不是在其后面进行动画处理。有没有办法让标签“消失”在标签栏后面?

到目前为止,我尝试了一些组合,包括创建一个与动画视图大小相同的“蒙版”视图,并将其放在窗口中但由于某种原因视图根本没有出现。我也尝试过使用insertSubview:belowSubview没有任何区别。我相信我必须在这里遗漏一些东西。

提前致谢!enter code here

1 个答案:

答案 0 :(得分:0)

是吗:

你正在寻找

[self bringSubviewToFront:yourView]吗?