Search code examples
iosobjective-cstoryboardmodalviewcontrollerpresentation

iOS Now Playing View Similar To Music/Spotify App


I am trying to figure out how to create a "Now Playing" view similar to the one in the Music app and the Spotify app.

Here are a few images of what I'm trying to re-create:

Now Playing Example from Music App

Now Playing Example from Spotify

Creating the view is not the problem. The part I'm having trouble with is how to keep the view on the screen at the bottom with the now playing information on it, but then when clicked, flicked, or swiped up, make it show like a modal.

Is this something that can be set up in Storyboard, or is it completely custom? How would you set this up?

Thank you in advanced for the help.


Solution

  • My guess is for Spotify it's custom as their implementation predates storyboards being... I'll use the term "friendly" to 3rd party developers.

    However if you're building with the latest Xcode and iOS SDK this should be fairly easy to accomplish by building a container view controller wherein the child view would be everything in the upper quadrant, and you would effectively make that parent viewcontroller (with the now playing view area on the bottom) the root view controller.

    As for the flicking / tapping, that's probably just a typical gesture recognizer that loads a modal. I can't recall if Apple's implementation is panning, but Spotify's is. My guess with them is as you as you tap down they load a new VC that's mostly obscured off screen and that's what actually gets panned in.