0

I want to have a view sliding in from the bottom, but the height of this view-element is just about the half of the screen height. The upper part of the screen should blur out.

I am very new to building ios-Apps and I wonder what is the best approach to do this.

Should I use viewElements in the same ViewController and just let them slide in etc. or is there some build-in functionality which I can use?

progNewbie
  • 4,362
  • 9
  • 48
  • 107

1 Answers1

1

You can do two things:

  1. define a custom interactive viewcontroller transition, that way you can add a blur view in the background and bind the offset of the scroll up to the blur effect to animate the change.
  2. (I think this is a lot easier to implement, but less reusable) embed a container view in your viewcontroller, add a pan gesture recognized on the view and as you pull your finger up, animate e.g. the bottom constraint's constant to move the view up and do the same with the background as described in step 1
Bence Pattogato
  • 3,752
  • 22
  • 30