I'm using the following code to make a small view disappear at the 开发者_如何学Pythonbottom of the screen:
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];
This works perfectly when the view is at the bottom of the screen but now I have to add it to the window above a TabBar meaning that the view is now animated over the top of the tabbar rather than behind it. Is there any way to have the view "disappear" behind the tabbar?
I've tried a combination of things so far including creating a "mask" view of the same size as the animated view and placing that in the window but for some reason that view did not appear at all. I also tried using insertSubview:belowSubview which made no difference. I'm sure I must be missing something here.
Thanks in advance!enter code here
Is it:
[self bringSubviewToFront:yourView]
you are looking for?
精彩评论