将项目从objective

编程入门 行业动态 更新时间:2024-10-22 15:37:52
项目从objective-c转换为swift后,无法同时满足约束条件(Unable to simultaneously satisfy constraints after transform project from objective-c to swift)

怎么可能,在没有问题的情况下在Objective-c中运行的应用程序在将其移动到swift之后得到“无法同时满足约束” - 错误?

我只是将应用程序的视图复制到swift-project,现在出现了这个错误。 但是当约束在objective-c中有效时,怎么可能,它们在swift中无效?

这是视图,我想显示:

如屏幕截图所示填写所有字段后,现在会出现错误。 当一个或多个字段为空时,仅抛出错误!

这是这种观点的约束

约束与objective-c-Version中的约束相同......

比尔兹利先生,我还能告诉你什么?

我上传了swift-Project到这里

你可以在这里找到objective-c-version(非常大!)

要得到错误,你必须这样:

How can it be possible, that an app, that runs in objective-c without problems, get the "Unable to simultaneously satisfy constraints"-error after moving it to swift?

I´ve only copied the views of an app to a swift-project and now get this error. But when the constraints are valid in objective-c, how is it possible, that they are invalid in swift???

This is the view, I want to display:

When all fields are filled as in the screenshot, now error appears. The error only is thrown when one or more fields are empty!

This are the contraints of this view

The constraints are the same as in the objective-c-Version...

What might i show u more, Mr Beardsley?

I uploaded the swift-Project to here

u can find the objective-c-version (very large!) here

to get the error, u must go this way:

最满意答案

Rob Mayoff先生是对的:我的Swift项目与Objective-C项目有不同的约束。 :-(

Mr. Rob Mayoff was right: my Swift project has different constraints than my Objective-C project. :-(

更多推荐

本文发布于:2023-08-07 11:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464243.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   objective

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!