开发者社区> 问答> 正文

如何让一个View旋转并缩小

我在实现一个View的旋转

    [UIView animateWithDuration:0.4 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut
                     animations:^(void) {
                         self.lb.transform = CGAffineTransformMakeRotation(3.14f);
                         self.lb.backgroundColor = [[UIColor alloc] initWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0];
                     }completion:nil];

可以实现View的旋转,变灰。
我的需求是,旋转变灰,缩小到消失。
请问我该怎么做

展开
收起
a123456678 2016-07-20 10:17:25 1678 0
1 条回答
写回答
取消 提交回答
  • [UIView animateWithDuration:0.4 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut

                     animations:^(void) {
                         CGAffineTransform t = CGAffineTransformMakeRotation(3.14f);
                         CGAffineTransformScale(t, 0, 0);
                         self.lb.transform = t;
                         self.lb.backgroundColor = [[UIColor alloc] initWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0];
                     }completion:nil];
    2019-07-17 19:58:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载