Как я могу оживить мой вид изменения размера? - PullRequest
3 голосов
/ 15 сентября 2010

Я изменяю размеры моих таблиц 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];

}

1 Ответ

11 голосов
/ 15 сентября 2010

Это должно сработать.

[UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:.5];
    headerView.frame = CGRectMake(0, 0, 320, 50);
    [UIView commitAnimations];
...