<错误计算值:CGAffineTransformInvert:奇异矩阵 [英] <Error>: CGAffineTransformInvert: singular matrix

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

问题描述

我试图做一个视图此动画,把它缩放以(0,0),然后使用移动方法CGRectMake此帧并缩放回(1,1)。
所以我用下面的code做到这一点。

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了这个太多了,并试图提供的所有解决方案(规模近到泽雷值,...),但没有什么工作,是否有任何人有解决这个的想法。
感谢您的帮助。

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.

我发现我的应用程序只,而在雅虎发生的错误。的 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.

的更多细节href=\"http://crafted-software.blogspot.com/2013/08/poor-yahoo.html\">我的博客。

More detail on my blog.

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

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