Search code examples
swiftxcodeipadios15

How to hide the three dots on the top area of the iPad dynamically


I have an iPad app which does have support for split screen multitasking. However there are some views which can display images and videos in full screen. On these screens the multitasking controls at the top of the screen are intrusive.

Is there any way to turn these off dynamically? Apple’s Photos app works the way I want. When showing a photo in full screen, the three dots fade away after a short time.

The answer here https://stackoverflow.com/a/70376095/1852207 turns off split screen support and disables the controls for all views. I want to hide on only some views.


Solution

  • Yes, in your viewcontroller, simply include:

    -(BOOL)prefersHomeIndicatorAutoHidden {
        return YES;
    }