preface

As an iOS developer, every time Apple introduces something new, it brings new challenges to the adaptation and development process, most recently with the iPhone X. Play is still very comfortable, but the application of the adaptation is always a certain process, this pain or to endure. One experience that’s not so great is that there’s always a bar at the bottom of the video that apple calls the “HomeIndicator.” I don’t have ocD, but IT’s annoying. So today I’m going to study how to get rid of this annoying bar.

start

I happen to see such a micro-blog on micro-blog

I just randomly found a simple demo that I had written before and tried it out.

- (BOOL)prefersHomeIndicatorAutoHidden{
    return YES;
}
Copy the code

I called this method directly from the controller I wanted to hide, and the effect I expected was that I would not see the annoying “bar” once it started.