问题描述
我有一个堆栈视图,我在其中添加了一个按钮,然后我想向该按钮添加一个图像。对于某些 png 图像,这是有效的,对于其他人,故事板中没有显示任何内容,而是引发错误。 “内部错误,编辑可能受限”。
因此可以怀疑图像有问题。所有图像均由inkscape生成,即导出为png并添加到我的项目的图像目录中。一些在 Ubuntu 上,一些在我的 Mac 上。
这是日志文件的一部分:
Failed to update scene 'BYZ-38-t0r' with IBLayoutConstraint (x23),IBUIViewAutolayoutGuide (x1),UIBarButtonItem (x2),UIButton (x3),UILabel (x4),UINavigationBar (x1),UINavigationItem (x2),UIStackView (x5),UITextView (x3),UIView (x1),and UIViewController (x1).
Exception name: NSInternalInconsistencyException
Exception reason: scale must be > 0
Exception backtrace:
0. CoreFoundation 0x0000000104671ae6 __exceptionPreprocess
1. libobjc.A.dylib 0x0000000104491e78 objc_exception_throw
2. CoreFoundation 0x000000010467191f +[NSException raise:format:]
3. Foundation 0x0000000103f4656a -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4. CoreUI 0x000000010aa4b64f -[CUIMutableThemeRendition initWithCGImage:withDescription:forKey:]
比例 > 0 表示什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)