How to change the bottom edge color on the iPhone X programmatically?

后端 未结 2 890
再見小時候
再見小時候 2020-12-28 15:10

It changes on their native keyboard/emoji board, depending which of the two are open. I thought it would change the color automatically based on UIInputViewController<

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 16:11

    If you wanna use other background color for the layout which differs with top and bottom edges, or want to keep status bar background color while switching apps, you could try to add two different views of different background color with height 50 or more (pt) in each layout nib. One constraints bottom alignment with top of the safe area, another one constraints top alignment with bottom of the safe area, and then make IBOutlet reference of these two views to set backgroundColor programmatically in code.

提交回复
热议问题