Search code examples
iosswiftanimationuicollectionviewcellcollectionview

How create ContextMenu for UICollectionView


I am need create feature like in iOS "Photos" system app, when you are have a list of photos and use long press to image, this collection view with images exanded, all background is blurred and has appeared popover menu, how I can create it? I am can detect long press on collection view and add some view behind, also I am try create blur effect but can't blur all behind particular cell.

This is image of this effect effect inside system app


Solution

  • Your screen shot shows a context menu interaction. Since this feature already exists at framework level, and since a collection view is ready to implement it for you, I suggest you just use it rather than trying to reinvent such a complicated thing for yourself.