动画

首尾式  

   [UIView beginAnimations:nil context:nil];

   [UIView setAnimationDuration:1.0];

   //要执行动画的代码

   [UIView commitAnimations];

block式

   [UIView animateWithDuration:0.25 animations:^{

 //要执行动画的代码

    }];

 

   [UIView animateWithDuration:0.25 animations:^{

        // 要执行动画的代码 

    } completion:^(BOOL finished) {

        // 动画执行完毕后会自动调用这个block内部的代码

    }];

posted @ 2015-03-17 14:19  浅忆0  阅读(104)  评论(0编辑  收藏  举报