Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change home indicator background color on iPhone X?

Tags:

I would like to change the background color of the view that appears on the bottom of the new iPhone X with a home indicator inside.

Is it possible?

like image 947
Fengson Avatar asked Sep 13 '17 10:09

Fengson


People also ask

How do you change the color of the X on iPhone?

To turn your phone black and white, go to the Settings app > General > Accessibility > Display Accommodations > Color Filters.


2 Answers

The home indicator color is determined automatically based on the color of the content below it.

Most of the time, this means you should not worry about its color since it is out of your control, and will always be clearly visible to users.

However, you can place a colored view in the area behind the home indicator to manipulate its color.

Examples

(Please note that these examples were taken on the iOS simulator, and behavior on a real device is different.)

Home indicator with white background

Background: white (#ffffff)

Home Indicator: black (#000000)


Home indicator with black background

Background: black (#000000)

Home Indicator: gray (#484848)


Home indicator with gray background

Background: gray (#5f5f5f)

Home Indicator: dark gray (#282828)


Home indicator with blue background

Background: blue (#1a98fc)

Home Indicator: very dark gray (#121212)


I wrote an in-depth article about the home indicator color if you want to learn more about its behavior: Reverse-Engineering the iPhone X Home Indicator Color

like image 94
nathangitter Avatar answered Oct 21 '22 13:10

nathangitter


The home indicator (line) colour is set automatically based on the content below it, often the root view background.

To change the background colour use this:

self.window.rootViewController.view.backgroundColor = [UIColor colorWithWhite:0.98 alpha:1.0] ; 
like image 20
A.Badger Avatar answered Oct 21 '22 12:10

A.Badger