Adapt screen to safe area on iPhone X

Hi,

I recently upgraded my old game to use Cocos Creator 1.9. How can I make it adapt to safe area on iPhone X. I already use story board as launch screen and my app scale well on iPhone SE, iPhone 6s, 6s+ but as I run it on iPhone X simulator there are blank gaps on two side (my game runs on landscape mode)

@jare, can you help us with this?

you can use cc.view.getSafeAreaRect(), then adapt to the view rect manually.

1 Like

I’m sorry for replying late, but can I make all scenes adapt to safe area or I have to adapt each specific view

You have to adapt each view.

can you provide quick sample, I’m currently adapting multiple resolution all upon canvas only