I have updated my project to Xcode 13 and iOS 15. Now the app is crashing with an error related to autoresizing masks in UITableViewCells. I have tried to change UITableViewCells Layer property in the inspector to Inferred and followed this post, but none of them are working.
Have you encountered this problem. How it could be fixed?
Here is some information about the error:
Interface Builder Config Image
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 = true
let gesture = UITapGestureRecognizer(target: self, action: #selector(showEvent))
gesture.numberOfTapsRequired = 1
eventView.addGestureRecognizer(gesture)
}
@objc
func showEvent() {
openEventClicked?()
}
Thanks