////Example 1
UIView *myView = self.view;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
CGRect newFrame = myView.frame;
newFrame.size.height = newFrame.size.height -[self getBannerHeight];
myView.frame = newFrame;
[UIView commitAnimations];
///Example 2
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2];
for (UIView *view in [self.view subviews]) {
if ([view class] == [UIButton class]|| [view class] == [UIImageView class]){
view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y - 27, view.frame.size.width, view.frame.size.height);
}
}
[UIView commitAnimations];
No comments:
Post a Comment