iOS 17 beta6 crashed

xcode15 beta6

iphone 12 pro、iOS 17 beta6

class ViewController: UIViewController {
    @IBOutlet weak var subView: UIView!
    @IBOutlet weak var imageView: BFAnimatedImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        imageView.layer.setNeedsDisplay()
    }
}


class BFAnimatedImageView: UIImageView {
    override func display(_ layer: CALayer) {
          super.display(layer)
    }
}

console log

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[display.BFAnimatedImageView displayLayer:]: unrecognized selector sent to instance 0x105809b30'
*** First throw call stack:
(0x18d3635e0 0x1856bbc00 0x18d3f3eec 0x1902a2830 0x18d2a8554 0x18d3e9860 0x104098f08 0x104098f74 0x18e8d3470 0x18e8d98a0 0x18e8d2b90 0x18f7a62d4 0x18d2adb58 0x18d2ac34c 0x18d2aa24c 0x18d2a9e18 0x1ce9675ec 0x18f6b7400 0x18f6b6a3c 0x18f8d9f10 0x104099ad0 0x104099a48 0x104099b4c 0x1afa3fd44)
libc++abi: terminating due to uncaught exception of type NSException

why crashed.....

Answered by Frameworks Engineer in 762556022

The -[CALayerDelegate displayLayer:] method is optional. UIImageView implemented it for a few releases, and we removed it briefly during this release, but because of code like this that doesn't check if it is actually implemented or not before calling it, we've restored it in future releases.

Accepted Answer

The -[CALayerDelegate displayLayer:] method is optional. UIImageView implemented it for a few releases, and we removed it briefly during this release, but because of code like this that doesn't check if it is actually implemented or not before calling it, we've restored it in future releases.

@Rincewind Has this issue been fixed in the iOS 17.0 public release? If not, do you know which release will have this restored? I am facing the same crash. Thanks.

iOS 17 beta6 crashed
 
 
Q