2

is it possible to change color of bottom horizontal line of iPhone X series within app(inside app only)? my client is asking to change color of this line, and i am not able to find any related topic or solution.

Thanks.

enter image description here

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Dhaval Bhimani
  • 980
  • 1
  • 13
  • 24
  • Related: [How to change home indicator background color on iPhone X?](https://stackoverflow.com/questions/46194557/how-to-change-home-indicator-background-color-on-iphone-x) – rmaddy May 08 '19 at 18:53

2 Answers2

3

No, I don't think it is. That's drawn by the system, and is not part of your app. Apple does not let apps change things outside of that app's "sandbox".

Edit:

I found a long article on the subject online:

https://medium.freecodecamp.org/reverse-engineering-the-iphone-x-home-indicator-color-a4c112f84d34

It seems it's called the "home indicator" and this author supports my suspicion that you can't change its color.

Edit #2

As Matt points out, the color of the home indicator changes automatically. The system has logic in it that tries to keep enough contrast between the home indicator and the area around it so that it's clearly visible. See the article I linked for more on that subject than you probably wanted to know.

Community
  • 1
  • 1
Duncan C
  • 128,072
  • 22
  • 173
  • 272
1

You can only remove it:

override var prefersHomeIndicatorAutoHidden: Bool {
    return true
}

The color is applied automatically.

Alexander Volkov
  • 7,904
  • 1
  • 47
  • 44