Reputation: 513
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).
Upvotes: 0
Views: 86
Reputation: 1471
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
Upvotes: 2
Reputation: 948
You could create a view with the blur effect, and use the method view.insertSubView(blurView, above|belowView: view)
Upvotes: 1