0

I have a UIView with some buttons on it. What I would like to do, is add a full screen blur layer between the UIView and the buttons when the user does a long press on one of them. The visual appearance and location of the buttons shouldn't change.

What is the best way to do this? Also, if possible, I would like to avoid transfering the buttons from one view to another, as this might cause me a lot of trouble (the buttons are draggable).

Snacks
  • 513
  • 4
  • 22

2 Answers2

2

You can use -[UIView insertSubview:belowSubview:] method to place blur view behind buttons.

I would suggest using Pop animation framework for animations.

As for creating blur view this looks good: https://stackoverflow.com/a/25706250/2754158

Community
  • 1
  • 1
Krzysztof
  • 1,441
  • 11
  • 22
  • Thank you very much, works like a charm. I feel like an idiot now, as the solution was surprisingly simple xD – Snacks Jan 08 '16 at 09:46
1

You could create a view with the blur effect, and use the method view.insertSubView(blurView, above|belowView: view)

TPlet
  • 898
  • 7
  • 13