如何让一个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的旋转,变灰。
我的需求是,旋转变灰,缩小到消失。
请问我该怎么做

阅读 6.9k
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];
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题