您的位置:首页 > 其它

CGAffineTransformInvert: singular matrix. 解决方案

2015-11-03 10:58 489 查看
这个错误叫奇异矩阵,

引起的原因有三种:

1  [UIFont fontWithName:@"AFontName" size:0]      你把字体的size设置为0了

2 你添加的view控件frame为0 例如:

I was seeing this problem too when I added a UIWebView to my self.view.

The offending code was:

UIWebView *wv = [[UIWebView alloc]init];

and the solution is:

UIWebView *wv = [[UIWebView alloc]initwithFrame:[[UIScreen mainScreen]bounds]];

or any framesize except 0.0.

3. UIScrollView, storyboard , autolayout 冲突,这个好像是苹果的问题,解决方法是
uncheck the "use autolayout" checkbox on storyboard properties

4.
 如果你用webview 载入网页出现这样问题的话,是因为
CSS 設定 display: inline-block 而造成 Transform 错误(估计是苹果的bug)

解決方法是:
選擇一:不要用「display: inline-block」(這應該會是 Apple 會回答你的解決方案)。

選擇一:如果你跟我一樣,使用「display:
inline-block」是為了要把 Element 排成橫的,那麼恭喜!你可以改用「display: table-cell」,效果一樣!

(文章出处:http://blog.sina.com.cn/s/blog_675142dc0101cif7.html)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: