Hey, I currently have:
Code:
-(void)setViewMovedUp:(BOOL)moveup
{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];
for (UIView *view in [window subviews])
{
//CGRect frame = CGRectMake(0.0, 20.0, window.bounds.size.width, 44.0);
CGRect frame = view.frame;
if(moveup) {
frame.origin.y -= 44;
//searcher.frame.origin.y -= 44;
//searcher.frame = CGRectMake(0.0, 20.0, window.bounds.size.width, 0);
}
else {
frame.origin. y += 44;
//searcher.frame.origin.y += 44;
//searcher.frame = CGRectMake(0.0, 20.0, window.bounds.size.width, 44.0);
}
view.frame = frame;
}
[UIView commitAnimations];
}
I am trying to move a search bar down from the top of the screen and then up again. The way it is currently, the whole view moves up and down which make sense. How can I alter this code so that only the search bar moves?