Frage

I am trying to create a music player which will be available in all my view controller scenes at the bottom. I have designed all my scenes using storyboard and I have them embedded in a UINavigationController. Am trying to achieve same technic which spotify have used to display the player at the bottom no matter which page you are on. I have created a AudioPlayerView controller subclassing UIViewController and implemented my music functionalities like playing and pause but now am stuck on how I can have that player included in the scenes and always be available no matter which scenes the user navigates to. I will really appreciate any help.

War es hilfreich?

Lösung

I'm sure there are myriad ways to accomplish this. I'd recommend using a custom container controller, which has the music player at the bottom and a navigation controller (which contains the rest of your app's controllers) above that.

You should take a look at the Presenting Another View Controller’s Content section of Apple's UIViewController Class Reference.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top