How to make the view that remains on the screen when switching to the main view?

How to create a view that does not seem to restart (remains on the screen) every time you view it? Like the audio controls in the Apple iOS podcast app. See the images to see the audio controls that I reference.

How to do this in a storyboard?

enter image description here

+4
source share
3 answers

What you mean is usually called a “mini player," and you will find it in many other applications.

, , "UIViewController Containment", "Container View" "Embed Segues".

:

  • , .
  • .
  • , -.
  • .

screen

.

, , vc. - , //... . .


GitHub: https://github.com/vikingosegundo/HearThisMiniplayer

screen

+4

(Unplayed, My Podcasts, Featured ..)? UITabBarController .

+1

I think you can do this by adding it on top of the application window (this is UIWindow, a subclass of UIView)

UIView *myView = /* <- Your custom view */;
UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow;
[currentWindow addSubview:myView];

Took the code fooobar.com/questions/55179 / ...

Or you can add to UITabBarController.view directly, since UIView spans the entire screen.

You need to make a custom presentation.

+1
source

Source: https://habr.com/ru/post/1665019/


All Articles