小编con*_*teu的帖子

必须将自动调整大小掩码转换为约束才能具有 _setHostsLayoutEngine:YES Xcode 13

我已将我的项目更新到 Xcode 13 和 iOS 15。现在应用程序崩溃,并出现与 UITableViewCells 中自动调整蒙版大小相关的错误。我尝试将检查器中的 UITableViewCells Layer 属性更改为 Inferred 并按照这篇文章进行操作,但它们都不起作用。

你遇到过这个问题吗。如何修复它?

以下是有关该错误的一些信息:

错误图像

界面生成器配置映像

override func awakeFromNib() {
    super.awakeFromNib()
    selectionStyle = .none
    setupEventAction()
    configureAccessibilityForCellItem()
}

override func prepareForReuse() {
    super.prepareForReuse()
    eventView.eventImageView.image = nil
}

func configureAnnouncement(announcement: AnnouncementsRowItem, isWhiteCell: Bool = false) {
    eventView.isHidden = announcement.event == nil
    eventView.backgroundView.backgroundColor = isWhiteCell ? R.color.basic1_bg() : R.color.basic2_bg()
    if announcement.event?.eventID.isEmpty ?? false || !isWhiteCell {
        self.backgroundColor = R.color.basic2_bg()
    }
    bubbleView.configureAnnouncementsBubbleView(announcement: announcement)
    eventView.configureAnnouncementsEventView(announcement: announcement)
    layoutIfNeeded()
}

private func setupEventAction() {
    eventView.isUserInteractionEnabled …
Run Code Online (Sandbox Code Playgroud)

uikit ios autolayout ios15 xcode13

22
推荐指数
3
解决办法
8869
查看次数

标签 统计

autolayout ×1

ios ×1

ios15 ×1

uikit ×1

xcode13 ×1