Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
649 views
in Technique[技术] by (71.8m points)

ios - How to change home indicator background color on iPhone X?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...