Why is Peek and Pop(Apple's sample code) not working?

https://developer.apple.com/documentation/uikit/deprecated_symbols/implementing_peek_and_pop

I got a sample code on the apple's website to test things about peek and pop. But it's not working. I couldn't find anything wrong with the sample code.

Any idea?

As noted at the URL you linked, Peek & Pop has been deprecated – the functionality it relied upon is no longer available and so any sample projects you may have found using it no longer work in many cases.

The successor is UIContextMenuInteraction, which includes some features of Peek & Pop as well as many additional features to help you build rich powerful interfaces. I would recommend you take a look!

Why is Peek and Pop(Apple's sample code) not working?
 
 
Q