gpt4 book ai didi

xcode - 布局中的奇怪异常

转载 作者:IT王子 更新时间:2023-10-29 05:22:58 25 4
gpt4 key购买 nike

尝试调用这个方法:

avatarIconImageView.setContentHuggingPriority(UILayoutPriorityDefaultLow, forAxis: UILayoutConstraintAxis.Horizontal)

并捕获这个异常:

Undefined symbols for architecture armv7:
"_UILayoutPriorityDefaultLow", referenced from: __TFC13TCProject_iOS36TCAvatarWithCounterUniversalCellView22configureBodyCellViewsfS0_FT_T_ in TCAvatarUniversalCellView.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是什么意思?

最佳答案

这看起来像是 iOS 8 SDK 中的错误。您只需传入一个原始值即可解决此问题。

  • UILayoutPriorityDefaultRequired = 1000
  • UILayoutPriorityDefaultHigh = 750
  • UILayoutPriorityDefaultLow = 250

在你的情况下

avatarIconImageView.setContentHuggingPriority(250, forAxis: UILayoutConstraintAxis.Horizontal)

关于xcode - 布局中的奇怪异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25881872/

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