& lt; Error& gt ;: CGAffineTransformInvert:奇异矩阵 [英] <Error>: CGAffineTransformInvert: singular matrix

查看:50
本文介绍了& lt; Error& gt ;: CGAffineTransformInvert:奇异矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在视图上执行此动画,将其缩放为(0,0),然后使用CGRectMake方法移动此帧并将其缩放回(1,1).所以我用下面的代码来做到这一点

Am trying to do this animation on a view, To Scale it to (0,0) then Move this frame using CGRectMake method and scale it back to (1,1). So I used the following Code to do this

-(void)startWalkAnimationStartWalkingBtnViewScaleToZero{
    CGAffineTransform transform = StartWalkBtnView.transform;

    StartWalkBtnView.transform=CGAffineTransformScale(transform,1.0f, 1.0f);
    [UIView animateWithDuration: 0.7
                          delay: 0.6
                        options: (UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
                     animations:^{ StartWalkBtnView.transform = CGAffineTransformScale(transform, 0.0f, 0.0f);
                     }
                     completion:^(BOOL finished){
                         [UIView animateWithDuration:0.0
                                               delay:0.0
                                             options: UIViewAnimationOptionCurveEaseIn
                                          animations:^{
                                              StartWalkBtnView.frame=CGRectMake(92, 270, 120, 121);
                                          }
                                          completion:^(BOOL finished){

                                              StartWalkBtnView.transform=CGAffineTransformScale(transform,0.0f, 0.0f);
                                              [UIView animateWithDuration: 0.7
                                                                    delay: 0.8
                                                                  options: (UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
                                                               animations:^{ StartWalkBtnView.transform = CGAffineTransformScale(transform, 1.0f, 1.0f);
                                                               }
                                                               completion:^(BOOL finished){}
                                               ];
                                          }];
                     }
     ];
}

但是尝试运行此动画后,我在控制台中收到以下错误.

But After trying to run this Animation I got the following error in the Console.

Jun 17 12:02:49 Kareem.local MyAppName[3157] <Error>: CGAffineTransformInvert: singular matrix.

我在Google上搜索了太多,并尝试了提供的所有解决方案(将比例缩放到zere Value,...),但没有任何效果,请问有人有解决此问题的想法吗?感谢您的帮助

I googled for this too much, and have tried all the solutions provided (Scale Near to zere Value,...) but nothing worked, Do any one has an idea for solving this. Thanks for help

更新: 我在以下行中发现了问题:

UPDATE: I found that the problem in the following line:

StartWalkBtnView.frame = CGRectMake(92,270,120,121);

StartWalkBtnView.frame=CGRectMake(92, 270, 120, 121);

但是实际上我不知道如何解决该问题,但是当我删除此行时,它缩放到零,然后从零开始正常返回而没有任何错误

But Actually I don't know how to solve the problem, But when I removed this line It scaled to zero then back from zero normally without any errors

推荐答案

网页的内容可能是导致此错误的原因,而不是您的iOS应用编程.

The content of the web page may be the cause of this error, not your iOS app programming.

我发现该错误仅在 Yahoo 上出现在我的应用程序中. Google.com ,没问题. Reuters.com ,没问题. SeattleTimes.com ,没问题.返回 Yahoo.com 问题.尤其是在滚动时,错误可能在一秒钟内出现几次.

I found the error occurred in my app only while on Yahoo. Google.com, no problem. Reuters.com, no problem. SeattleTimes.com, no problem. Back to Yahoo.com, problem. Especially while scrolling when the error may appear a few times in a split second.

有关我的博客的详细信息.

这篇关于&amp; lt; Error&amp; gt ;: CGAffineTransformInvert:奇异矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆