如何以动画方式调整视图大小?
我正在调整表 headerView 的大小。我想将其动画化,但我不知道如何做。
-(void)layoutForBanner
{
// Depending on if the banner has been loaded, we adjust the content frame and banner location
// to accomodate the ad being on or off screen.
// This layout is for an ad at the bottom of the view.
if(banner.bannerLoaded)
{
headerView.frame = CGRectMake(0, 0, 320, 94);
}
else
{
headerView.frame = CGRectMake(0, 0, 320, 50);
}
[self.tableView setTableHeaderView:headerView];
}
I am resizing my tables headerView. I want to animate it, but I am not sure how.
-(void)layoutForBanner
{
// Depending on if the banner has been loaded, we adjust the content frame and banner location
// to accomodate the ad being on or off screen.
// This layout is for an ad at the bottom of the view.
if(banner.bannerLoaded)
{
headerView.frame = CGRectMake(0, 0, 320, 94);
}
else
{
headerView.frame = CGRectMake(0, 0, 320, 50);
}
[self.tableView setTableHeaderView:headerView];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该可以解决问题。
This should do the trick.