开发者社区 问答 正文

如何让一个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 1738 分享
分享
版权
举报
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 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
问答分类:
问答地址:
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等