gpt4 book ai didi

iOS - 尝试实现动画时钟 : Unable to simultaneously satisfy constraints runtime error -noob level 99

转载 作者:行者123 更新时间:2023-11-29 02:53:40 26 4
gpt4 key购买 nike

我承认我有点难以理解,但我认为我错过了一些简单的东西。

我在 github 上找到了这个可爱的时钟,但它没有被打包为可包含的,并且我不了解有关约束的运行时错误足以正确实现此代码。不过,我喜欢这个时钟,所以如果有人可以提供帮助,我很乐意将其包含在我的应用程序中!

时钟: https://github.com/DuncanMC/ClockAnimation

我做了什么:

-开始一个新的单 View Xcode项目- 将时钟指针图像从 Images.xcassets 复制(拖放)到我的项目中的 Images.xcassets 中-复制相关类和 View Controller 代码

我在运行时遇到这个错误:

Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)

(
"<NSIBPrototypingLayoutConstraint:0x8c31fb0 'IB auto generated at build time for view with fixed frame' H:[UIImageView:0x8c2bde0(22)]>",
"<NSIBPrototypingLayoutConstraint:0x8c31fe0 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c2bde0(250)]>"
)

Will attempt to recover by breaking constraint
<NSIBPrototypingLayoutConstraint:0x8c31fe0 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c2bde0(250)]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2014-06-11 14:34:36.537 Project Manager[1739:70b] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSIBPrototypingLayoutConstraint:0x8c32070 'IB auto generated at build time for view with fixed frame' H:[UIImageView:0x8c2fa00(22)]>",
"<NSIBPrototypingLayoutConstraint:0x8c320a0 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c2fa00(250)]>"
)

Will attempt to recover by breaking constraint
<NSIBPrototypingLayoutConstraint:0x8c320a0 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c2fa00(250)]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2014-06-11 14:34:36.555 Project Manager[1739:70b] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSIBPrototypingLayoutConstraint:0x8c32200 'IB auto generated at build time for view with fixed frame' H:[UIImageView:0x8c0d210(22)]>",
"<NSIBPrototypingLayoutConstraint:0x8c32230 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c0d210(250)]>"
)

Will attempt to recover by breaking constraint
<NSIBPrototypingLayoutConstraint:0x8c32230 'IB auto generated at build time for view with fixed frame' V:[UIImageView:0x8c0d210(250)]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

最佳答案

在 View 的文件检查器中关闭自动布局!它应该工作。 image

关于iOS - 尝试实现动画时钟 : Unable to simultaneously satisfy constraints runtime error -noob level 99,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24170829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com