react native Webview ios <Error>: CGAffineTransformInvert: singular matrix.

来源:互联网 发布:淘宝网买四轮电动车 编辑:程序博客网 时间:2024/05/01 09:29

如果是IOS Native

如果你尝试,并设置缩放比例为零,你会得到这个消息:<Error>: CGAffineTransformInvert: singular matrix.

   [UIView animateWithDuration:0.5 animations:^{

                CGAffineTransform newTransform =  CGAffineTransformScale(myView, 0.00.0);

                [myView setTransform:newTransform];

            } completion:^(BOOL finished) {

            }];


改为:CGAffineTransform newTransform =  CGAffineTransformScale(s.transform0.0001f0.00001f);


但是RN里面的webview 并没有这些东西 

根据 http://stackoverflow.com/questions/17145114/error-cgaffinetransforminvert-singular-matrix

这里面的问题讨论,就是因为webview 的 frame 问题导致,

需要设置webview 的是style,而不是在父组件中设置




0 0
原创粉丝点击