美文网首页
A multiplier of 0 or a nil secon

A multiplier of 0 or a nil secon

作者: 天空中的球 | 来源:发表于2021-11-03 08:09 被阅读0次

A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.

iOS 15 上最近的Crash

以上就是我们最近 Bugly 上的一个 Crash, 仅仅发生在 iOS 15 上,之前都是好的

一、初步分析

  • 布局之前,该视图没有添加到父视图上
  • 布局的时候,约束的写法不对,没有对应之类的

二、代码分析

代码定位

三、备用应急方案

由于此处是一个简单的视图,可以直接替换,直接不用这个方法啦。

四、慢慢着手分析

今天再次分析的时候,发现 [UIApplication sharedApplication].delegate 可能是为空的,如果这个为空的情况,那就很符合目前这个错了
解决方法:[UIApplication sharedApplication].delegate.window 用其代替的。

目前通过上面这个方法发布几个版本发现暂时没重现。。。。。

相关文章

网友评论

      本文标题:A multiplier of 0 or a nil secon

      本文链接:https://www.haomeiwen.com/subject/zhqnwltx.html